Skip to content

Commit ae53c82

Browse files
refactor(tatak): include student names in getting students attended
1 parent 151a0f0 commit ae53c82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/db/models/univ_events/attendance.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ class Attendance {
135135
const db = Database.getInstance();
136136

137137
try {
138-
// Get admin by username
139138
const result = await db.query<AttendanceModel[]>(
140-
`SELECT attendance.* FROM attendance INNER JOIN univ_students ON univ_students.course_id = ? where attendance.student_id = univ_students.student_id AND event_id = ?`, [courseId, eventId]
139+
`select attendance.*, s.first_name, s.last_name, s.course_id, c.acronym from attendance inner join univ_students s inner join colleges_courses c on c.id = s.course_id where attendance.student_id = s.student_id and event_id = ? and c.college_id = ?`, [eventId,courseId]
141140
);
141+
142142
if(result){
143143
resolve(result);
144144
}else{

0 commit comments

Comments
 (0)