update: removed unused code

This commit is contained in:
krizam
2026-10-20 02:55:26 +05:30
parent 4ac74b8481
commit 4d937b92da
3 changed files with 15 additions and 20 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
## setup steps
0. Node and other npm , yarn and basic dependacny should be installed on system as per the OS.
1. Clone this repo.
1. Clone this repo. : git@git.krizam.com:krizam/Backend_Assignment1.git
2. Create .env file with below content
``MONGO_URI='mongodb+srv://krishankanhaya0007_db_user:Eo4RwoCE0bv6M1jI@firstcluster.j7g9al2.mongodb.net/'``
+1 -6
View File
@@ -5,12 +5,8 @@ import { Types } from 'mongoose';
const SessionsRoutes = express.Router();
// Get All Sessions
SessionsRoutes.get('/', async(req, res) => {
})
// Add New User for teacher
// Add New Session for teacher
SessionsRoutes.post('/', async(req, res) => {
const {teacherId, startTime, endTime } = req.body;
@@ -98,7 +94,6 @@ SessionsRoutes.post('/:id/book', async(req: any, res) => {
SessionsRoutes.patch('/:id/complete', async(req: any, res) => {
const {id} = req.params;
const {userId} = req.body;
const existingSession = await Sessions.findOne({_id: id, });
+1 -1
View File
@@ -21,7 +21,7 @@ const MONGO_URI = process.env.MONGO_URI!;
app.use('/users', UsersRoutes);
// Teachers
app.use('/api/teachers', TeachersRoutes);
app.use('/teachers', TeachersRoutes);
// Sessions