chore(backend): Verwijder redundante methoden
This commit is contained in:
parent
edc52a559c
commit
2f5bb333db
6 changed files with 8 additions and 58 deletions
|
@ -1,11 +1,9 @@
|
|||
import { DwengoEntityRepository } from '../dwengo-entity-repository.js';
|
||||
import { LearningPath } from '../../entities/content/learning-path.entity.js';
|
||||
import { Language } from '@dwengo-1/common/util/language';
|
||||
import { MatchMode } from '@dwengo-1/common/util/match-mode';
|
||||
import { LearningPathNode } from '../../entities/content/learning-path-node.entity.js';
|
||||
import { RequiredEntityData } from '@mikro-orm/core';
|
||||
import { LearningPathTransition } from '../../entities/content/learning-path-transition.entity.js';
|
||||
import { Teacher } from '../../entities/users/teacher.entity';
|
||||
|
||||
export class LearningPathRepository extends DwengoEntityRepository<LearningPath> {
|
||||
public async findByHruidAndLanguage(hruid: string, language: Language): Promise<LearningPath | null> {
|
||||
|
@ -15,18 +13,6 @@ export class LearningPathRepository extends DwengoEntityRepository<LearningPath>
|
|||
}, { populate: ['nodes', 'nodes.transitions', 'admins'] });
|
||||
}
|
||||
|
||||
public async findByAdmins(admins: Teacher[], language: Language, _matchMode?: MatchMode): Promise<LearningPath[]> {
|
||||
return this.findAll({
|
||||
where: {
|
||||
language: language,
|
||||
admins: {
|
||||
$in: admins,
|
||||
},
|
||||
},
|
||||
populate: ['nodes', 'nodes.transitions'],
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all learning paths which have the given language and whose title OR description contains the
|
||||
* query string.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue