mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-05 05:08:07 +02:00
fix: catch error when requesting a folder
This commit is contained in:
+1
-12
@@ -580,18 +580,7 @@ angular
|
|||||||
$scope.$on("$routeUpdate", changedUrl);
|
$scope.$on("$routeUpdate", changedUrl);
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.controller("faqController", [
|
.controller("faqController", ["$scope", "$http", function ($scope, $http) {}])
|
||||||
"$scope",
|
|
||||||
"$http",
|
|
||||||
function ($scope, $http) {
|
|
||||||
function getSupportedFileTypes() {
|
|
||||||
$http.get("/api/supportedTypes").then((res) => {
|
|
||||||
$scope.supportedFileTypes = res.data;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
getSupportedFileTypes();
|
|
||||||
},
|
|
||||||
])
|
|
||||||
.controller("profileController", [
|
.controller("profileController", [
|
||||||
"$scope",
|
"$scope",
|
||||||
"$http",
|
"$http",
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -25,12 +25,12 @@ router.post("/", async (req: express.Request, res: express.Response) => {
|
|||||||
commit: commit,
|
commit: commit,
|
||||||
getToken: () => token,
|
getToken: () => token,
|
||||||
});
|
});
|
||||||
const content = await source.getFileContentCache(
|
|
||||||
filePath,
|
|
||||||
repoId,
|
|
||||||
() => fileSha
|
|
||||||
);
|
|
||||||
try {
|
try {
|
||||||
|
const content = await source.getFileContentCache(
|
||||||
|
filePath,
|
||||||
|
repoId,
|
||||||
|
() => fileSha
|
||||||
|
);
|
||||||
const mime = lookup(filePath);
|
const mime = lookup(filePath);
|
||||||
if (mime && !filePath.endsWith(".ts")) {
|
if (mime && !filePath.endsWith(".ts")) {
|
||||||
res.contentType(mime);
|
res.contentType(mime);
|
||||||
|
|||||||
Reference in New Issue
Block a user