Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kmehta5 committed Oct 3, 2024
1 parent 60f6e5b commit d5f0e57
Showing 1 changed file with 2 additions and 65 deletions.
67 changes: 2 additions & 65 deletions src/controllers/ohQueue.js
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

0 comments on commit d5f0e57

Please sign in to comment.