File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Request , Response } from "express" ;
22import * as memberService from "../services/member.service" ;
33import { ApiError } from "../utils/apiError" ;
4- import { deleteImage , uploadImage } from "../utils/imageUtils" ;
4+ import { uploadImage } from "../utils/imageUtils" ;
55import { SupabaseClient } from "@supabase/supabase-js" ;
66
77// List all approved members
88export const listAllApprovedMembers = async ( req : Request , res : Response ) => {
99
10- const { email, password } = req . query ;
10+ const { email} = req . query ;
1111
12- if ( email && password ) {
12+ if ( email ) {
1313
1414 const user = await memberService . getUserByEmail ( email as string ) ;
1515
Original file line number Diff line number Diff line change 11import express from 'express' ;
22import * as acheivementsCtrl from '../controllers/achievement.controller' ;
3- import { supabase } from '../app' ;
43import { Multer } from 'multer' ;
54import { SupabaseClient } from '@supabase/supabase-js' ;
65
Original file line number Diff line number Diff line change 11import express from "express" ;
22import * as memberCtrl from "../controllers/member.controller" ;
33import { Multer } from "multer" ;
4- import { supabase } from "../app" ;
54import { SupabaseClient } from "@supabase/supabase-js" ;
65
76export default function membersRouter (
Original file line number Diff line number Diff line change @@ -15,8 +15,17 @@ export default function progressRouter() {
1515 * @apiParam {String} memberId ID of the member to retrieve completed questions for.
1616 *
1717 * @apiSuccess {String="SUCCESS"} status Response status.
18- * @apiSuccess {Object[]} completedQuestion List of completed questions.
19- * @apiSuccess {Number} completedQuestion.questionId Id of the completed question.
18+ * @apiSuccess {Object[]} completedQuestion List of questions inside the topic.
19+ * @apiSuccess {Object} completedQuestion[].question Question object.
20+ * @apiSuccess {Number} completedQuestion[].question.id Question ID.
21+ * @apiSuccess {String} completedQuestion[].question.questionName Name of the question.
22+ * @apiSuccess {String} completedQuestion[].question.link Link to the question.
23+ * @apiSuccess {String="Easy","Medium","Hard"} completedQuestion[].question.difficulty Difficulty level of the question.
24+ * @apiSuccess {Number} completedQuestion[].question.topicId Topic ID associated with the question.
25+ * @apiSuccess {Number} completedQuestion[].question.createdAt Timestamp when the question was created (Unix timestamp).
26+ * @apiSuccess {Number} completedQuestion[].question.updatedAt Timestamp when the question was last updated (Unix timestamp).
27+ * @apiSuccess {String} completedQuestion[].question.createdById ID of the user who created the question.
28+ * @apiSuccess {String} completedQuestion[].question.updatedById ID of the user who last updated the question.
2029 *
2130 * @apiError (Error 400) BadRequest Missing required fields.
2231 * @apiError (Error 500) InternalServerError Error while fetching completed questions.
You can’t perform that action at this time.
0 commit comments