aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/user/user-notification.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-27 09:07:38 +0200
committerChocobozzz <me@florianbigard.com>2021-07-27 17:10:52 +0200
commit29837f8885eb37fa300e4b80c90a6d03ab337084 (patch)
treea7a066c6604c9adec4cb21c1bd1965c5bf253b03 /server/models/user/user-notification.ts
parent5d0095fde19d803bead7cbad0452bd09f3351adc (diff)
downloadPeerTube-29837f8885eb37fa300e4b80c90a6d03ab337084.tar.gz
PeerTube-29837f8885eb37fa300e4b80c90a6d03ab337084.tar.zst
PeerTube-29837f8885eb37fa300e4b80c90a6d03ab337084.zip
Add ability to search by host in server
Diffstat (limited to 'server/models/user/user-notification.ts')
-rw-r--r--server/models/user/user-notification.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/models/user/user-notification.ts b/server/models/user/user-notification.ts
index a7f84e9ca..04c5513a9 100644
--- a/server/models/user/user-notification.ts
+++ b/server/models/user/user-notification.ts
@@ -1,5 +1,6 @@
1import { FindOptions, ModelIndexesOptions, Op, WhereOptions } from 'sequelize' 1import { FindOptions, ModelIndexesOptions, Op, WhereOptions } from 'sequelize'
2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript' 2import { AllowNull, BelongsTo, Column, CreatedAt, Default, ForeignKey, Is, Model, Scopes, Table, UpdatedAt } from 'sequelize-typescript'
3import { uuidToShort } from '@server/helpers/uuid'
3import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user' 4import { UserNotificationIncludes, UserNotificationModelForApi } from '@server/types/models/user'
4import { AttributesOnly } from '@shared/core-utils' 5import { AttributesOnly } from '@shared/core-utils'
5import { UserNotification, UserNotificationType } from '../../../shared' 6import { UserNotification, UserNotificationType } from '../../../shared'
@@ -615,6 +616,7 @@ export class UserNotificationModel extends Model<Partial<AttributesOnly<UserNoti
615 return { 616 return {
616 id: video.id, 617 id: video.id,
617 uuid: video.uuid, 618 uuid: video.uuid,
619 shortUUID: uuidToShort(video.uuid),
618 name: video.name 620 name: video.name
619 } 621 }
620 } 622 }
@@ -628,6 +630,7 @@ export class UserNotificationModel extends Model<Partial<AttributesOnly<UserNoti
628 ? { 630 ? {
629 id: abuse.VideoCommentAbuse.VideoComment.Video.id, 631 id: abuse.VideoCommentAbuse.VideoComment.Video.id,
630 name: abuse.VideoCommentAbuse.VideoComment.Video.name, 632 name: abuse.VideoCommentAbuse.VideoComment.Video.name,
633 shortUUID: uuidToShort(abuse.VideoCommentAbuse.VideoComment.Video.uuid),
631 uuid: abuse.VideoCommentAbuse.VideoComment.Video.uuid 634 uuid: abuse.VideoCommentAbuse.VideoComment.Video.uuid
632 } 635 }
633 : undefined 636 : undefined