diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml index 7c4e1f9e97..b5895b77de 100644 --- a/public/openapi/read.yaml +++ b/public/openapi/read.yaml @@ -327,4 +327,39 @@ paths: "/api/groups/{slug}/members": $ref: 'read/groups/slug/members.yaml' /api/outgoing: - $ref: 'read/outgoing.yaml' \ No newline at end of file + $ref: 'read/outgoing.yaml' + + /api/oh-queue: + $ref: 'read/oh-queue.yaml' + + + + # /api/oh-queue: + # get: + # tags: + # - oh-queue + # summary: Welcome to the Office Hours Queue page + # description: This route serves a welcome message to the OH queue page. + # responses: + # "200": + # description: A welcome message is presented + # content: + # application/json: + # schema: + # allOf: + # - type: object + # # required: + # # - message + # # properties: + # # message: + # # type: string + # # description: Welcome message for the OH queue page + # # example: "Welcome to the Office Hours Queue page!" + + + + + + + + diff --git a/public/openapi/read/oh-queue.yaml b/public/openapi/read/oh-queue.yaml new file mode 100644 index 0000000000..ba76e583d4 --- /dev/null +++ b/public/openapi/read/oh-queue.yaml @@ -0,0 +1,15 @@ + +# bing copilot +get: + responses: + '200': + description: Successful response + # content: + # application/json: + # schema: + # type: object + # # required: + # # - message + # properties: + # message: + # type: string diff --git a/src/api/oh-queue.js b/src/api/oh-queue.js new file mode 100644 index 0000000000..97e7061db5 --- /dev/null +++ b/src/api/oh-queue.js @@ -0,0 +1,15 @@ +// source chatGPT +// const controllers = require.main.require('./src/controllers'); + +'use strict'; + +module.exports = (app, middleware) => { + app.get('/oh-queue', middleware.buildHeader, (req, res) => { + res.render('oh-queue', {}); + }); + app.get('/api/oh-queue', (req, res) => { + res.json({ + // message: 'Welcome to the Office Hours Queue page!', + }); + }); +}; diff --git a/src/controllers/ohQueue.js b/src/controllers/ohQueue.js new file mode 100644 index 0000000000..b34cc74e03 --- /dev/null +++ b/src/controllers/ohQueue.js @@ -0,0 +1,12 @@ + +'use strict'; + +const ohQueue = {}; + +ohQueue.get = function (req, res) { + res.render('oh-queue', {}); +}; + +module.exports = ohQueue; + +// bing copilot diff --git a/src/routes/index.js b/src/routes/index.js index 4008f1565a..113c29a1cf 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -7,6 +7,9 @@ const express = require('express'); const meta = require('../meta'); const controllers = require('../controllers'); + +const ohQueue = require('../controllers/ohQueue'); + const controllerHelpers = require('../controllers/helpers'); const plugins = require('../plugins'); @@ -37,6 +40,8 @@ _mounts.main = (app, middleware, controllers) => { setupPageRoute(app, '/reset/:code?', [middleware.delayLoading], controllers.reset); setupPageRoute(app, '/tos', [], controllers.termsOfUse); + setupPageRoute(app, '/oh-queue', [], ohQueue.get); + setupPageRoute(app, '/email/unsubscribe/:token', [], controllers.accounts.settings.unsubscribe); app.post('/email/unsubscribe/:token', controllers.accounts.settings.unsubscribePost);