Skip to content

Commit

Permalink
fix(backend): fix i/signin-history response
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Oct 22, 2023
1 parent 230b431 commit 9221cbf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/backend/src/core/entities/SigninEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,26 @@ 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,
) {
}

@bindThis
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,
};
}
}

0 comments on commit 9221cbf

Please sign in to comment.