|
|
@@ -3,8 +3,9 @@ import { subDays } from 'date-fns';
|
|
|
import Crowi from '../crowi';
|
|
|
import {
|
|
|
InAppNotification, STATUS_UNREAD, STATUS_UNOPENED, STATUS_OPENED,
|
|
|
+ InAppNotificationDocument,
|
|
|
} from '~/server/models/in-app-notification';
|
|
|
-import { IInAppNotification } from '../../interfaces/in-app-notification';
|
|
|
+
|
|
|
import { ActivityDocument } from '~/server/models/activity';
|
|
|
import InAppNotificationSettings from '~/server/models/in-app-notification-settings';
|
|
|
import Subscription, { STATUS_SUBSCRIBE } from '~/server/models/subscription';
|
|
|
@@ -82,7 +83,10 @@ export default class InAppNotificationService {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- getLatestNotificationsByUser = async(userId: Types.ObjectId, queryOptions: {offset: number, limit: number}): Promise<PaginateResult<IInAppNotification>> => {
|
|
|
+ getLatestNotificationsByUser = async(
|
|
|
+ userId: Types.ObjectId,
|
|
|
+ queryOptions: {offset: number, limit: number},
|
|
|
+ ): Promise<PaginateResult<InAppNotificationDocument>> => {
|
|
|
const { limit, offset } = queryOptions;
|
|
|
|
|
|
try {
|