|
@@ -1,6 +1,4 @@
|
|
|
-import mongoose from 'mongoose';
|
|
|
|
|
-
|
|
|
|
|
-import { UpdatePostDocument, UpdatePostModel } from '~/server/models/update-post';
|
|
|
|
|
|
|
+import UpdatePost from '~/server/models/update-post';
|
|
|
import { toArrayFromCsv } from '~/utils/to-array-from-csv';
|
|
import { toArrayFromCsv } from '~/utils/to-array-from-csv';
|
|
|
|
|
|
|
|
|
|
|
|
@@ -72,8 +70,6 @@ export class UserNotificationService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private async putDefaultChannelIfEmpty(pagePath:string, slackChannels: (string|null)[]): Promise<void> {
|
|
private async putDefaultChannelIfEmpty(pagePath:string, slackChannels: (string|null)[]): Promise<void> {
|
|
|
- const UpdatePost = mongoose.model<UpdatePostDocument, UpdatePostModel>('UpdatePost');
|
|
|
|
|
-
|
|
|
|
|
const updatePosts = await UpdatePost.findSettingsByPath(pagePath);
|
|
const updatePosts = await UpdatePost.findSettingsByPath(pagePath);
|
|
|
slackChannels.push(...(updatePosts).map(up => up.channel));
|
|
slackChannels.push(...(updatePosts).map(up => up.channel));
|
|
|
|
|
|