update: removed unused code
This commit is contained in:
@@ -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/'``
|
||||
|
||||
|
||||
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user