mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 07:25:12 +00:00
fix(backend): fix i/signin-history response
This commit is contained in:
parent
230b4318bd
commit
9221cbf42b
1 changed files with 9 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue