Commit aa6d2bf1 authored by Pawan Kumar's avatar Pawan Kumar
Browse files

get candidate by roll number

No related merge requests found
Showing with 13 additions and 0 deletions
+13 -0
......@@ -34,6 +34,11 @@ export class AppController {
return this.appService.getStudentById(params.id);
}
@Get('student/:rollnumber')
getStudentByRollnumber(@Param() params) {
return this.appService.getStudentByRollnumber(params.rollnumber);
}
@Get('tutor/:id')
getTutor(@Param() params) {
return this.appService.getTutorById(params.id);
......
......@@ -143,4 +143,12 @@ export class AppService {
);
return res.recordset[0];
}
async getStudentByRollnumber(id: string) {
const db = await this.dbConnection.connect();
const res = await db.query(
`Select * from upsmfac_casa.dbo.Master_StudentProfile where RollNo='${id}'`,
);
return res.recordset[0];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment