check repo status for github page

This commit is contained in:
tdurieux
2021-04-21 23:00:11 +02:00
parent fbc7952d62
commit 0ea31b8c7f

View File

@@ -17,6 +17,13 @@ async function webView(req, res) {
if (!repoConfig.options.pageSource) {
throw "page_not_activated";
}
if (repoConfig.status == "expired") {
throw "repository_expired";
}
if (repoConfig.status == "removed") {
throw "repository_expired";
}
if (repoConfig.options.pageSource.branch != repoConfig.branch) {
throw "page_not_supported_on_different_branch";