mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-09-30 22:09:35 +02:00
check if branch exist
This commit is contained in:
1 parent
5a5609ef9e
commit
d762332ef2
1 file changed
+3
@@ -277,6 +277,9 @@ router.post("/", async (req, res) => {
|
||||
repoConfig,
|
||||
token: req.user.accessToken,
|
||||
});
|
||||
if (details.branches[repoConfig.branch] == null) {
|
||||
return res.status(500).send({ error: "invalid_branch" });
|
||||
}
|
||||
if (repoConfig.options.mode == "download") {
|
||||
// details.size is in kilobytes
|
||||
if (details.size > config.MAX_REPO_SIZE) {
|
||||
|
||||
Reference in new issue
Block a user