Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit fffd587

Browse files
committed
custom interview thank you page draft
1 parent 3610543 commit fffd587

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

server.js

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
const express = require("express");
44

55
const app = express();
6+
const miscRouter = require("./src/server/misc/router");
7+
8+
// Register misc routes
9+
app.use("/taas-app/misc", miscRouter);
610

711
app.use(
812
"/taas-app",

src/server/misc/router.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Misc router
3+
*
4+
* Add any `/misc` routes here.
5+
*/
6+
const express = require("express");
7+
const router = express.Router();
8+
9+
const getInterviewThankYouPageController = require("./routes/interview-thank-you-page");
10+
11+
router.get("/interview-thank-you-page", getInterviewThankYouPageController);
12+
13+
module.exports = router;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/**
2+
* Custom Interview Thank You Page
3+
*/
4+
const url = require("url");
5+
/**
6+
* Render custom HTML thank you page for scheduled or rescheduled interview.
7+
*
8+
* @param {import("express").Request} req express request
9+
* @param {import("express").Response} res express response
10+
*/
11+
function getInterviewThankYouPageController(req, res) {
12+
const query = req.query;
13+
const fullURL = url.format({
14+
protocol: req.protocol,
15+
host: req.get("host"),
16+
pathname: req.originalUrl,
17+
});
18+
19+
res.set("Content-Type", "text/html");
20+
res.send(
21+
`<h1>Thank you page (under construction)</h1>
22+
<pre>
23+
URL: ${fullURL}
24+
query: ${JSON.stringify(query, null, 2)}</pre>`
25+
);
26+
}
27+
28+
module.exports = getInterviewThankYouPageController;

0 commit comments

Comments
 (0)