From 9221cbf42bd45139c189b95fd66647a527f1b6d7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 23 Oct 2023 08:59:05 +0900 Subject: [PATCH] fix(backend): fix i/signin-history response --- .../backend/src/core/entities/SigninEntityService.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/entities/SigninEntityService.ts b/packages/backend/src/core/entities/SigninEntityService.ts index 8c88e8560..6bde3e589 100644 --- a/packages/backend/src/core/entities/SigninEntityService.ts +++ b/packages/backend/src/core/entities/SigninEntityService.ts @@ -7,10 +7,12 @@ import { Injectable } from '@nestjs/common'; import type { } from '@/models/Blocking.js'; import type { MiSignin } from '@/models/Signin.js'; import { bindThis } from '@/decorators.js'; +import { IdService } from '@/core/IdService.js'; @Injectable() export class SigninEntityService { constructor( + private idService: IdService, ) { } @@ -18,7 +20,13 @@ export class SigninEntityService { public async pack( src: MiSignin, ) { - return src; + return { + id: src.id, + createdAt: this.idService.parse(src.id).date.toISOString(), + ip: src.ip, + headers: src.headers, + success: src.success, + }; } }