refactor AnonymizedFile

This commit is contained in:
tdurieux
2021-08-13 00:03:28 +02:00
parent b2426f70b2
commit 47f44fe41e
6 changed files with 155 additions and 133 deletions

View File

@@ -19,7 +19,8 @@ router.get(
try {
await repo.countView();
const f = new AnonymizedFile(repo, {
const f = new AnonymizedFile({
repository: repo,
anonymizedPath,
});
if (!(await f.isFileSupported())) {

View File

@@ -34,7 +34,8 @@ async function webView(req: express.Request, res: express.Response) {
requestPath = path.join(requestPath, "index.html");
}
requestPath = requestPath;
const f = new AnonymizedFile(repo, {
const f = new AnonymizedFile({
repository: repo,
anonymizedPath: requestPath,
});
if (!(await f.isFileSupported())) {