mirror of
https://github.com/PretendoNetwork/miiverse-api.git
synced 2026-04-24 15:16:53 -05:00
prefer inference in models
This commit is contained in:
parent
78c61249c5
commit
55ec9232a7
|
|
@ -129,4 +129,4 @@ CommunitySchema.method('json', function json(): Record<string, any> {
|
|||
};
|
||||
});
|
||||
|
||||
export const Community: CommunityModel = model<ICommunity, CommunityModel>('Community', CommunitySchema);
|
||||
export const Community = model<ICommunity, CommunityModel>('Community', CommunitySchema);
|
||||
|
|
@ -53,4 +53,4 @@ ContentSchema.method('removeFromFollowers', async function removeFromFollowers(p
|
|||
await this.save();
|
||||
});
|
||||
|
||||
export const Content: ContentModel = model<IContent, ContentModel>('Content', ContentSchema);
|
||||
export const Content = model<IContent, ContentModel>('Content', ContentSchema);
|
||||
|
|
|
|||
|
|
@ -58,4 +58,4 @@ ConversationSchema.method('markAsRead', async function markAsRead(pid) {
|
|||
await this.save();
|
||||
});
|
||||
|
||||
export const Conversation: ConversationModel = model<IConversation, ConversationModel>('Conversation', ConversationSchema);
|
||||
export const Conversation = model<IConversation, ConversationModel>('Conversation', ConversationSchema);
|
||||
|
|
@ -12,4 +12,4 @@ const endpointSchema = new Schema<IEndpoint, EndpointModel, IEndpointMethods>({
|
|||
n3ds_host: String
|
||||
});
|
||||
|
||||
export const Endpoint: EndpointModel = model<IEndpoint, EndpointModel>('Endpoint', endpointSchema);
|
||||
export const Endpoint = model<IEndpoint, EndpointModel>('Endpoint', endpointSchema);
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ NotificationSchema.method('markRead', async function markRead() {
|
|||
await this.save();
|
||||
});
|
||||
|
||||
export const Notification: NotificationModel = model<INotification, NotificationModel>('Notification', NotificationSchema);
|
||||
export const Notification = model<INotification, NotificationModel>('Notification', NotificationSchema);
|
||||
|
|
|
|||
|
|
@ -232,4 +232,4 @@ PostSchema.pre('save', async function(next) {
|
|||
next();
|
||||
});
|
||||
|
||||
export const Post: PostModel = model<IPost, PostModel>('Post', PostSchema);
|
||||
export const Post = model<IPost, PostModel>('Post', PostSchema);
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ const ReportSchema = new Schema<IReport, ReportModel, IReportMethods>({
|
|||
}
|
||||
});
|
||||
|
||||
export const Report: ReportModel = model<IReport, ReportModel>('Report', ReportSchema);
|
||||
export const Report = model<IReport, ReportModel>('Report', ReportSchema);
|
||||
|
|
|
|||
|
|
@ -95,4 +95,4 @@ SettingsSchema.method('json', function json(): Record<string, any> {
|
|||
};
|
||||
});
|
||||
|
||||
export const Settings: SettingsModel = model<ISettings, SettingsModel>('Settings', SettingsSchema);
|
||||
export const Settings = model<ISettings, SettingsModel>('Settings', SettingsSchema);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user