Skip to content

Commit

Permalink
Moving how redirection is done
Browse files Browse the repository at this point in the history
  • Loading branch information
Hayden Smith authored and Hayden Smith committed Sep 16, 2024
1 parent 0a73bb0 commit 7797390
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand Down

0 comments on commit 7797390

Please sign in to comment.