Shun Miyazawa 4 лет назад
Родитель
Сommit
9e64949738

+ 2 - 2
packages/app/src/interfaces/in-app-notification-settings.ts

@@ -1,4 +1,4 @@
-import { Schema } from 'mongoose';
+import { Types } from 'mongoose';
 
 export enum subscribeRuleNames {
   PAGE_CREATE = 'PAGE_CREATE'
@@ -12,6 +12,6 @@ export interface ISubscribeRule {
   isEnabled: boolean;
 }
 export interface IInAppNotificationSettings {
-  userId: Schema.Types.ObjectId;
+  userId: Types.ObjectId;
   subscribeRules: ISubscribeRule[];
 }

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

@@ -7,7 +7,7 @@ export interface InAppNotificationSettingsDocument extends IInAppNotificationSet
 export type InAppNotificationSettingsModel = Model<InAppNotificationSettingsDocument>
 
 const inAppNotificationSettingsSchema = new Schema<IInAppNotificationSettings>({
-  userId: { type: String },
+  userId: { type: Schema.Types.ObjectId },
   subscribeRules: [
     {
       name: { type: String, require: true, enum: subscribeRuleNames },