feat: flatten file tree for better performance

This commit is contained in:
tdurieux
2024-04-26 10:31:57 +01:00
parent ccdc95e4a8
commit 710f7328e7
23 changed files with 516 additions and 514 deletions
+2 -5
View File
@@ -38,15 +38,12 @@ export async function getPullRequest(
export async function getRepo(
req: express.Request,
res: express.Response,
opt: { nocheck?: boolean; includeFiles?: boolean } = {
opt: { nocheck?: boolean } = {
nocheck: false,
includeFiles: false,
}
) {
try {
const repo = await db.getRepository(req.params.repoId, {
includeFiles: opt.includeFiles === true,
});
const repo = await db.getRepository(req.params.repoId);
if (opt.nocheck == true) {
} else {
// redirect if the repository is expired