mirror of
https://github.com/djdevin/recflare.git
synced 2026-10-28 00:18:58 -07:00
[www] add delete account request
This commit is contained in:
@@ -219,6 +219,10 @@ function toSelfAccountDto(account: Account) {
|
||||
// everyone can be old.
|
||||
birthday: '1904-01-01T00:00:00.000Z',
|
||||
availableUsernameChanges: account.availableUsernameChanges ?? DEFAULT_USERNAME_CHANGES,
|
||||
// The website's "delete account" mark, so its account page can show it. Always a
|
||||
// boolean (the game client drops unknown members and reads nothing here).
|
||||
isDeleted: account.isDeleted === true,
|
||||
...(account.isDeleted === true && account.deletedAt ? { deletedAt: account.deletedAt } : {}),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -98,6 +98,12 @@ export const SelfAccountDto = AccountDto.extend({
|
||||
),
|
||||
birthday: z.iso.datetime().describe('A fixed placeholder — birthdays are not stored'),
|
||||
availableUsernameChanges: z.int().describe('Remaining username changes'),
|
||||
isDeleted: z
|
||||
.boolean()
|
||||
.describe(
|
||||
'Whether the player asked the website to delete this account (a mark, not a deletion)'
|
||||
),
|
||||
deletedAt: z.iso.datetime().optional().describe('When they asked; present only when isDeleted'),
|
||||
})
|
||||
|
||||
/** Player bio, from `GET /account/:id/bio`. */
|
||||
|
||||
Reference in New Issue
Block a user