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,8 +1,8 @@
|
|||
import { Language } from "@dwengo-1/common/util/language";
|
||||
import learningObjectService from "../../../services/learning-objects/learning-object-service";
|
||||
import { authorize } from "../auth";
|
||||
import { AuthenticatedRequest } from "../authenticated-request";
|
||||
import { AuthenticationInfo } from "../authentication-info";
|
||||
import { Language } from '@dwengo-1/common/util/language';
|
||||
import learningObjectService from '../../../services/learning-objects/learning-object-service';
|
||||
import { authorize } from '../auth';
|
||||
import { AuthenticatedRequest } from '../authenticated-request';
|
||||
import { AuthenticationInfo } from '../authentication-info';
|
||||
|
||||
export const onlyAdminsForLearningObject = authorize(async (auth: AuthenticationInfo, req: AuthenticatedRequest) => {
|
||||
const { hruid } = req.params;
|
||||
|
@ -10,7 +10,7 @@ export const onlyAdminsForLearningObject = authorize(async (auth: Authentication
|
|||
const admins = await learningObjectService.getAdmins({
|
||||
hruid,
|
||||
language: language as Language,
|
||||
version: parseInt(version as string)
|
||||
version: parseInt(version as string),
|
||||
});
|
||||
return admins.includes(auth.username);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue