diff --git a/routes/auth.js b/routes/auth.js index ef7cdfb..98ae8c1 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -43,14 +43,14 @@ app.get("/api/auth/logout", (rreq,rres) => { if (dbRes.count > 0) { rres.send("Success") } else { - rres.status(400).send("Error: Token does not exist.") + rres.status(400).send("Token does not exist.") } }).catch(dbErr => { logRequest(rres,rreq,500,dbErr) - rres.status(500).send("Error: Exception occured while invalidating token, details: "+dbErr) + rres.status(500).send("Exception occured while invalidating token, details: "+dbErr) }) } else { - rres.status(400).send("Error: Missing token or authorization header, you may not be logged in.") + rres.status(400).send("Missing token or authorization header, you may not be logged in.") } }) diff --git a/routes/helpdesk.js b/routes/helpdesk.js index 1c37c4d..d456bb5 100644 --- a/routes/helpdesk.js +++ b/routes/helpdesk.js @@ -8,4 +8,12 @@ app.get("/helpdesk/articles/*", (rreq, rres) => { rres.sendFile(process.cwd()+"/website/helpdesk/kbas/"+rreq.url.replace("/helpdesk/articles/","")) }) +app.get("/helpdesk/ticket/new", (rreq,rres) => { + rres.sendFile(process.cwd()+"/website/helpdesk/templates/newticket.html") +}) + +app.get("/api/helpdesk/forms/*", (rreq, rres) => { + rres.sendFile(process.cwd()+"/website/helpdesk/forms/"+rreq.url.replace("/api/helpdesk/forms/","")) +}) + export { app } \ No newline at end of file diff --git a/website/helpdesk/forms/manifest.json b/website/helpdesk/forms/manifest.json new file mode 100644 index 0000000..9807937 --- /dev/null +++ b/website/helpdesk/forms/manifest.json @@ -0,0 +1,10 @@ +{ + "general_inquiry": "General Inquiry", + "legalrequest": "Legal Request", + "responsibledisclosure": "Responsible Disclosure", + "general_techsupport": "General Technical Support", + "ecls_deleteaccount": "ECLS: Delete Account", + "ecls_passwordreset": "ECLS: Password Reset", + "ecls_personalinfochange": "ECLS: Personal Information Change", + "enstrayedcloud_quotachange": "Enstrayed Cloud: Quota Change" +} \ No newline at end of file diff --git a/website/helpdesk/templates/landing.html b/website/helpdesk/templates/landing.html index 266e752..16ba4b7 100644 --- a/website/helpdesk/templates/landing.html +++ b/website/helpdesk/templates/landing.html @@ -4,30 +4,8 @@