From e0c30de751d9a1faaeb815b66781e3d811730705 Mon Sep 17 00:00:00 2001 From: riku6460 <17585784+riku6460@users.noreply.github.com> Date: Tue, 26 Sep 2023 05:19:01 +0900 Subject: [PATCH] fix backend typecheck --- packages/backend/src/core/AnnouncementService.ts | 2 ++ packages/backend/src/core/DriveService.ts | 2 +- .../server/api/endpoints/admin/announcements/create.ts | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/core/AnnouncementService.ts b/packages/backend/src/core/AnnouncementService.ts index d49641f54ac4..5449427b8d47 100644 --- a/packages/backend/src/core/AnnouncementService.ts +++ b/packages/backend/src/core/AnnouncementService.ts @@ -326,6 +326,8 @@ export class AnnouncementService { icon: announcement.icon, display: announcement.display, needConfirmationToRead: announcement.needConfirmationToRead, + closeDuration: announcement.closeDuration, + displayOrder: announcement.displayOrder, forYou: announcement.userId === me?.id, isRead: reads.some(read => read.announcementId === announcement.id), })); diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts index 7e90d9e1d370..ef1a8491eeb0 100644 --- a/packages/backend/src/core/DriveService.ts +++ b/packages/backend/src/core/DriveService.ts @@ -677,7 +677,7 @@ export class DriveService { await this.driveFilesRepository.update(file.id, values); - const fileObj = await this.driveFileEntityService.pack(file.id, { self: true }); + const fileObj = await this.driveFileEntityService.pack(file.id, updater, { self: true }); // Publish fileUpdated event if (file.userId) { diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts index 6b18b89bafdc..e98e27c224ad 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/create.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/create.ts @@ -53,7 +53,7 @@ export const meta = { type: 'string', optional: false, nullable: false, }, - forExistingUsers: { + forYou: { type: 'boolean', optional: false, nullable: false, }, @@ -69,9 +69,9 @@ export const meta = { type: 'number', optional: false, nullable: false, }, - userId: { - type: 'string', - optional: false, nullable: true, + isRead: { + type: 'boolean', + optional: true, nullable: false, }, }, },