refactor(backend): logger i.p.v. console

This commit is contained in:
Tibo De Peuter 2025-03-22 17:16:33 +01:00
parent 30ec73a88d
commit c14d6c53da
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
9 changed files with 30 additions and 22 deletions

View file

@ -8,6 +8,7 @@ import { mapToStudent, mapToStudentDTO, StudentDTO } from '../interfaces/student
import { mapToSubmissionDTO, SubmissionDTO } from '../interfaces/submission.js';
import { getAllAssignments } from './assignments.js';
import { UserService } from './users.js';
import { getLogger } from '../logging/initalize.js';
export async function getAllStudents(): Promise<StudentDTO[]> {
const studentRepository = getStudentRepository();
@ -35,7 +36,7 @@ export async function createStudent(userData: StudentDTO): Promise<StudentDTO |
return mapToStudentDTO(newStudent);
} catch (e) {
console.log(e);
getLogger().error(e);
return null;
}
}
@ -54,7 +55,7 @@ export async function deleteStudent(username: string): Promise<StudentDTO | null
return mapToStudentDTO(user);
} catch (e) {
console.log(e);
getLogger().error(e);
return null;
}
}