From 7797390d12144cf2d7917a9afb5c011a06eb4448 Mon Sep 17 00:00:00 2001 From: Hayden Smith Date: Mon, 16 Sep 2024 23:45:30 +1000 Subject: [PATCH] Moving how redirection is done --- backend/src/server.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/src/server.js b/backend/src/server.js index 267758c..0a1418b 100644 --- a/backend/src/server.js +++ b/backend/src/server.js @@ -272,11 +272,9 @@ app.get('/gitlabredir/:term/:repo/:path?', (req, res) => { if (repo === 'ass2') newRepo = config.TERMS[term].ASS_MAP[1]; if (repo === 'ass3') newRepo = config.TERMS[term].ASS_MAP[2]; if (repo === 'ass4') newRepo = config.TERMS[term].ASS_MAP[3]; - let repoPath = ``; + repoPath = `https://nw-syd-gitlab.cseunsw.tech/COMP6080/${term}/students/z${zid}/${newRepo}` if (isTutor(zid)) { repoPath = `https://nw-syd-gitlab.cseunsw.tech/COMP6080/${term}/STAFF/repos/${newRepo}` - } else if (['ass1', 'ass2', 'ass3', 'exercises'].includes(repo)) { - repoPath = `https://nw-syd-gitlab.cseunsw.tech/COMP6080/${term}/students/z${zid}/${newRepo}` } else if (['ass4'].includes(repo)) { const group = builtData[term].groups[zid]; repoPath = `https://nw-syd-gitlab.cseunsw.tech/COMP6080/${term}/groups/${group}/${newRepo}`