mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-03-09 22:25:32 +00:00
refactor AnonymizedFile
This commit is contained in:
@@ -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())) {
|
||||
|
||||
@@ -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())) {
|
||||
|
||||
Reference in New Issue
Block a user