forked from CMU-313/cmu-313-f24-nodebb-f24-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,11 @@ | ||
// bing copilot | ||
'use strict'; | ||
|
||
const ohQueue = {}; | ||
|
||
ohQueue.get = function (req, res) { | ||
res.render('oh-queue', {}); | ||
res.render('oh-queue', {}); | ||
}; | ||
|
||
module.exports = ohQueue; | ||
|
||
|
||
|
||
|
||
// // Source: ChatGPT | ||
|
||
// 'use strict'; | ||
|
||
// const querystring = require('querystring'); | ||
|
||
// const helpers = require('./helpers'); | ||
|
||
// const ohQueueController = module.exports; | ||
|
||
// const ohQueue = (req, res) => { | ||
// res.render('oh-queue', {}); | ||
// }; | ||
|
||
// module.exports = ohQueue; | ||
|
||
|
||
// ohQueueController.get = async function (req, res, next) { | ||
// const data = await ohQueueController.getQueueData(req, res); | ||
// if (!data) { | ||
// return next(); | ||
// } | ||
|
||
// res.render('oh-queue', data); | ||
// }; | ||
|
||
// ohQueueController.render = async function (req, res) { | ||
// // Simulate a queue rendering logic. You could replace this with actual queue data. | ||
// const data = { | ||
// title: 'OH Queue', | ||
// description: 'This is the OH Queue page', | ||
// queue: [ | ||
// { name: 'Student 1', topic: 'Database Design', time: '10:00 AM' }, | ||
// { name: 'Student 2', topic: 'Algorithms', time: '10:15 AM' }, | ||
// { name: 'Student 3', topic: 'Operating Systems', time: '10:30 AM' }, | ||
// ], | ||
// }; | ||
|
||
// // Render the template 'oh-queue.tpl' | ||
// res.render('oh-queue', data); | ||
// }; | ||
|
||
// ohQueueController.getQueueData = async function (req, res) { | ||
// const page = parseInt(req.query.page, 10) || 1; | ||
// const itemsPerPage = 10; | ||
// const start = Math.max(0, (page - 1) * itemsPerPage); | ||
// const stop = start + itemsPerPage - 1; | ||
|
||
// // Simulate fetching queue data | ||
// const queueData = [ | ||
// { name: 'Student 1', topic: 'Database Design', time: '10:00 AM' }, | ||
// { name: 'Student 2', topic: 'Algorithms', time: '10:15 AM' }, | ||
// { name: 'Student 3', topic: 'Operating Systems', time: '10:30 AM' }, | ||
// // ... more data | ||
// ]; | ||
|
||
// const paginatedData = queueData.slice(start, stop + 1); | ||
// res.json(paginatedData); | ||
// return queueData | ||
// }; | ||
// bing copilot |