style: fix linting issues met ESLint

This commit is contained in:
Lint Action 2025-03-01 10:33:27 +00:00
parent 81bbe84dfd
commit 74765577d5
26 changed files with 73 additions and 73 deletions

View file

@ -4,13 +4,13 @@ export abstract class DwengoEntityRepository<
T extends object,
> extends EntityRepository<T> {
public async save(entity: T) {
let em = this.getEntityManager();
const em = this.getEntityManager();
em.persist(entity);
await em.flush();
}
public async deleteWhere(query: FilterQuery<T>) {
let toDelete = await this.findOne(query);
let em = this.getEntityManager();
const toDelete = await this.findOne(query);
const em = this.getEntityManager();
if (toDelete) {
em.remove(toDelete);
await em.flush();

View file

@ -9,7 +9,7 @@ export class AnswerRepository extends DwengoEntityRepository<Answer> {
author: Teacher;
content: string;
}): Promise<Answer> {
let answerEntity = new Answer();
const answerEntity = new Answer();
answerEntity.toQuestion = answer.toQuestion;
answerEntity.author = answer.author;
answerEntity.content = answer.content;

View file

@ -9,7 +9,7 @@ export class QuestionRepository extends DwengoEntityRepository<Question> {
author: Student;
content: string;
}): Promise<Question> {
let questionEntity = new Question();
const questionEntity = new Question();
questionEntity.learningObjectHruid = question.loId.hruid;
questionEntity.learningObjectLanguage = question.loId.language;
questionEntity.learningObjectVersion = question.loId.version;