mirror of
https://gitbruv.vercel.app/api/git/bruv/gitbruv.git
synced 2025-12-20 23:24:09 +01:00
fix?
This commit is contained in:
parent
9a3ca83fd7
commit
4395d0fdce
3 changed files with 17 additions and 17 deletions
|
|
@ -23,21 +23,21 @@ export async function GET(request: NextRequest) {
|
|||
}
|
||||
|
||||
const repoPrefix = getRepoPrefix(user.id, `${repo}.git`);
|
||||
const allKeys = await r2List(repoPrefix + "/");
|
||||
|
||||
const allKeys = await r2List("");
|
||||
const repoKeys = allKeys.filter((k) => k.startsWith(repoPrefix));
|
||||
|
||||
const head = await r2Get(`${repoPrefix}/HEAD`);
|
||||
const config = await r2Get(`${repoPrefix}/config`);
|
||||
|
||||
const refsHeadsMain = await r2Get(`${repoPrefix}/refs/heads/main`);
|
||||
const refsMaster = await r2Get(`${repoPrefix}/refs/heads/master`);
|
||||
|
||||
return NextResponse.json({
|
||||
repoPrefix,
|
||||
totalKeys: allKeys.length,
|
||||
keys: allKeys.slice(0, 100),
|
||||
totalKeysInBucket: allKeys.length,
|
||||
repoKeys: repoKeys,
|
||||
head: head?.toString(),
|
||||
config: config?.toString(),
|
||||
"refs/heads/main": refsHeadsMain?.toString(),
|
||||
"refs/heads/master": refsMaster?.toString(),
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue