Browse Source

AllSupportedTargetModel -> AllSupportedTargetModels

Shun Miyazawa 3 years ago
parent
commit
ab4cb343ad

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

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

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

@@ -6,7 +6,7 @@ import mongoosePaginate from 'mongoose-paginate-v2';
 
 import {
   IActivity, ISnapshot, AllSupportedAction, SupportedActionType,
-  AllSupportedTargetModel, SupportedTargetModelType,
+  AllSupportedTargetModels, SupportedTargetModelType,
   AllSupportedEventModel, SupportedEventModelType,
 } from '~/interfaces/activity';
 
@@ -56,7 +56,7 @@ const activitySchema = new Schema<ActivityDocument, ActivityModel>({
   },
   targetModel: {
     type: String,
-    enum: AllSupportedTargetModel,
+    enum: AllSupportedTargetModels,
   },
   target: {
     type: Schema.Types.ObjectId,

+ 2 - 2
packages/app/src/server/models/in-app-notification.ts

@@ -4,7 +4,7 @@ import {
 } from 'mongoose';
 import mongoosePaginate from 'mongoose-paginate-v2';
 
-import { AllSupportedTargetModel, AllSupportedAction } from '~/interfaces/activity';
+import { AllSupportedTargetModels, AllSupportedAction } from '~/interfaces/activity';
 import { InAppNotificationStatuses } from '~/interfaces/in-app-notification';
 
 import { ActivityDocument } from './activity';
@@ -46,7 +46,7 @@ const inAppNotificationSchema = new Schema<InAppNotificationDocument, InAppNotif
   targetModel: {
     type: String,
     required: true,
-    enum: AllSupportedTargetModel,
+    enum: AllSupportedTargetModels,
   },
   target: {
     type: Schema.Types.ObjectId,

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

@@ -3,7 +3,7 @@ import {
   Types, Document, Model, Schema,
 } from 'mongoose';
 
-import { AllSupportedTargetModel } from '~/interfaces/activity';
+import { AllSupportedTargetModels } from '~/interfaces/activity';
 import { SubscriptionStatusType, AllSubscriptionStatusType } from '~/interfaces/subscription';
 
 
@@ -38,7 +38,7 @@ const subscriptionSchema = new Schema<SubscriptionDocument, SubscriptionModel>({
   targetModel: {
     type: String,
     required: true,
-    enum: AllSupportedTargetModel,
+    enum: AllSupportedTargetModels,
   },
   target: {
     type: Schema.Types.ObjectId,