mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-01 19:45:33 +02:00
check if branch exist
This commit is contained in:
@@ -277,6 +277,9 @@ router.post("/", async (req, res) => {
|
|||||||
repoConfig,
|
repoConfig,
|
||||||
token: req.user.accessToken,
|
token: req.user.accessToken,
|
||||||
});
|
});
|
||||||
|
if (details.branches[repoConfig.branch] == null) {
|
||||||
|
return res.status(500).send({ error: "invalid_branch" });
|
||||||
|
}
|
||||||
if (repoConfig.options.mode == "download") {
|
if (repoConfig.options.mode == "download") {
|
||||||
// details.size is in kilobytes
|
// details.size is in kilobytes
|
||||||
if (details.size > config.MAX_REPO_SIZE) {
|
if (details.size > config.MAX_REPO_SIZE) {
|
||||||
|
|||||||
Reference in New Issue
Block a user