|
|
@@ -1,4 +1,4 @@
|
|
|
-import { type IUserHasId } from '@growi/core';
|
|
|
+import { SCOPE, type IUserHasId } from '@growi/core';
|
|
|
import { ErrorV3 } from '@growi/core/dist/models';
|
|
|
import type { Request, RequestHandler } from 'express';
|
|
|
import { type ValidationChain, query } from 'express-validator';
|
|
|
@@ -41,7 +41,7 @@ export const getRecentThreadsFactory: GetRecentThreadsFactory = (crowi) => {
|
|
|
];
|
|
|
|
|
|
return [
|
|
|
- accessTokenParser, loginRequiredStrictly, certifyAiService, validator, apiV3FormValidator,
|
|
|
+ accessTokenParser([SCOPE.READ.FEATURES.AI_ASSISTANT], { acceptLegacy: true }), loginRequiredStrictly, certifyAiService, validator, apiV3FormValidator,
|
|
|
async(req: Req, res: ApiV3Response) => {
|
|
|
const openaiService = getOpenaiService();
|
|
|
if (openaiService == null) {
|