Просмотр исходного кода

ownerAccessScope -> accessScope

Shun Miyazawa 1 год назад
Родитель
Сommit
6002af9417

+ 2 - 2
apps/app/src/features/openai/interfaces/ai-assistant.ts

@@ -21,7 +21,7 @@ export const AiAssistantAccessScope = {
 *  Interfaces
 */
 export type AiAssistantShareScope = typeof AiAssistantShareScope[keyof typeof AiAssistantShareScope];
-export type AiAssistantOwnerAccessScope = typeof AiAssistantAccessScope[keyof typeof AiAssistantAccessScope];
+export type AiAssistantAccessScope = typeof AiAssistantAccessScope[keyof typeof AiAssistantAccessScope];
 
 export interface AiAssistant {
   name: string;
@@ -32,5 +32,5 @@ export interface AiAssistant {
   owner: Ref<IUser>
   grantedGroups?: IGrantedGroup[]
   shareScope: AiAssistantShareScope
-  ownerAccessScope: AiAssistantOwnerAccessScope
+  accessScope: AiAssistantAccessScope
 }

+ 1 - 1
apps/app/src/features/openai/server/models/ai-assistant.ts

@@ -70,7 +70,7 @@ const schema = new Schema<AiAssistantDocument>(
       enum: Object.values(AiAssistantShareScope),
       required: true,
     },
-    ownerAccessScope: {
+    accessScope: {
       type: String,
       enum: Object.values(AiAssistantAccessScope),
       required: true,

+ 2 - 2
apps/app/src/features/openai/server/routes/ai-assistant.ts

@@ -79,9 +79,9 @@ export const createAiAssistantFactory: CreateAssistantFactory = (crowi) => {
       .isIn(Object.values(AiAssistantShareScope))
       .withMessage('Invalid shareScope value'),
 
-    body('ownerAccessScope')
+    body('accessScope')
       .isIn(Object.values(AiAssistantAccessScope))
-      .withMessage('Invalid ownerAccessScope value'),
+      .withMessage('Invalid accessScope value'),
   ];
 
   return [