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

AllSupportedEventModel -> AllSupportedEventModels

Shun Miyazawa 3 лет назад
Родитель
Сommit
c87ee8792f

+ 1 - 1
packages/app/src/interfaces/activity.ts

@@ -209,7 +209,7 @@ export const CommentActions = Object.values({
  * Array
  */
 export const AllSupportedTargetModels = Object.values(SupportedTargetModel);
-export const AllSupportedEventModel = Object.values(SupportedEventModel);
+export const AllSupportedEventModels = Object.values(SupportedEventModel);
 export const AllSupportedAction = Object.values(SupportedAction);
 export const AllSupportedActionToNotified = Object.values(SupportedActionToNotified);
 export const AllSmallGroupActions = Object.values(SmallActionGroup);

+ 2 - 2
packages/app/src/server/models/activity.ts

@@ -7,7 +7,7 @@ import mongoosePaginate from 'mongoose-paginate-v2';
 import {
   IActivity, ISnapshot, AllSupportedAction, SupportedActionType,
   AllSupportedTargetModels, SupportedTargetModelType,
-  AllSupportedEventModel, SupportedEventModelType,
+  AllSupportedEventModels, SupportedEventModelType,
 } from '~/interfaces/activity';
 
 import loggerFactory from '../../utils/logger';
@@ -64,7 +64,7 @@ const activitySchema = new Schema<ActivityDocument, ActivityModel>({
   },
   eventModel: {
     type: String,
-    enum: AllSupportedEventModel,
+    enum: AllSupportedEventModels,
   },
   event: {
     type: Schema.Types.ObjectId,