From 1e141023161be7fab886259e92888aa6d7ca0921 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 3 Feb 2022 20:45:18 +0900 Subject: [PATCH] refactor: use toISOString --- packages/backend/src/models/repositories/abuse-user-report.ts | 2 +- packages/backend/src/models/repositories/moderation-logs.ts | 2 +- packages/backend/src/models/repositories/note-favorite.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/models/repositories/abuse-user-report.ts b/packages/backend/src/models/repositories/abuse-user-report.ts index 943b65eb64..144195855b 100644 --- a/packages/backend/src/models/repositories/abuse-user-report.ts +++ b/packages/backend/src/models/repositories/abuse-user-report.ts @@ -12,7 +12,7 @@ export class AbuseUserReportRepository extends Repository { return await awaitAll({ id: report.id, - createdAt: report.createdAt, + createdAt: report.createdAt.toISOString(), comment: report.comment, resolved: report.resolved, reporterId: report.reporterId, diff --git a/packages/backend/src/models/repositories/moderation-logs.ts b/packages/backend/src/models/repositories/moderation-logs.ts index 1585d5bfcf..f530613bcc 100644 --- a/packages/backend/src/models/repositories/moderation-logs.ts +++ b/packages/backend/src/models/repositories/moderation-logs.ts @@ -12,7 +12,7 @@ export class ModerationLogRepository extends Repository { return await awaitAll({ id: log.id, - createdAt: log.createdAt, + createdAt: log.createdAt.toISOString(), type: log.type, info: log.info, userId: log.userId, diff --git a/packages/backend/src/models/repositories/note-favorite.ts b/packages/backend/src/models/repositories/note-favorite.ts index c5de55c0c0..f4cd64e393 100644 --- a/packages/backend/src/models/repositories/note-favorite.ts +++ b/packages/backend/src/models/repositories/note-favorite.ts @@ -13,7 +13,7 @@ export class NoteFavoriteRepository extends Repository { return { id: favorite.id, - createdAt: favorite.createdAt, + createdAt: favorite.createdAt.toISOString(), noteId: favorite.noteId, note: await Notes.pack(favorite.note || favorite.noteId, me), };