style: fix linting issues met Prettier
This commit is contained in:
parent
a65e95ac46
commit
1203f12ff4
33 changed files with 359 additions and 307 deletions
|
@ -1,13 +1,13 @@
|
|||
import { Language } from "@dwengo-1/common/util/language";
|
||||
import learningPathService from "../../../services/learning-paths/learning-path-service";
|
||||
import { authorize } from "../auth";
|
||||
import { AuthenticatedRequest } from "../authenticated-request";
|
||||
import { AuthenticationInfo } from "../authentication-info";
|
||||
import { Language } from '@dwengo-1/common/util/language';
|
||||
import learningPathService from '../../../services/learning-paths/learning-path-service';
|
||||
import { authorize } from '../auth';
|
||||
import { AuthenticatedRequest } from '../authenticated-request';
|
||||
import { AuthenticationInfo } from '../authentication-info';
|
||||
|
||||
export const onlyAdminsForLearningPath = authorize(async (auth: AuthenticationInfo, req: AuthenticatedRequest) => {
|
||||
const adminsForLearningPath = await learningPathService.getAdmins({
|
||||
hruid: req.params.hruid,
|
||||
language: req.params.language as Language
|
||||
language: req.params.language as Language,
|
||||
});
|
||||
return adminsForLearningPath && adminsForLearningPath.includes(auth.username);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue