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 943b65eb6..144195855 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 1585d5bfc..f530613bc 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 c5de55c0c..f4cd64e39 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), };