|
|
@@ -10,6 +10,7 @@ import type { SupportedActionType } from '~/interfaces/activity';
|
|
|
import { AllSupportedActions } from '~/interfaces/activity';
|
|
|
import type Crowi from '~/server/crowi';
|
|
|
import { apiV3FormValidator } from '~/server/middlewares/apiv3-form-validator';
|
|
|
+import loginRequiredFactory from '~/server/middlewares/login-required';
|
|
|
import type { ApiV3Response } from '~/server/routes/apiv3/interfaces/apiv3-response';
|
|
|
import loggerFactory from '~/utils/logger';
|
|
|
|
|
|
@@ -39,9 +40,7 @@ interface AuthorizedRequest
|
|
|
|
|
|
export const factory = (crowi: Crowi): Router => {
|
|
|
const accessTokenParser = crowi.accessTokenParser;
|
|
|
- const loginRequiredStrictly = require('~/server/middlewares/login-required')(
|
|
|
- crowi,
|
|
|
- );
|
|
|
+ const loginRequiredStrictly = loginRequiredFactory(crowi);
|
|
|
|
|
|
const validators = {
|
|
|
auditLogBulkExport: [
|