global update and global fix
This commit is contained in:
@@ -139,5 +139,22 @@ export class ProfileController {
|
||||
await this.assertSelfAccess(authorization, userId);
|
||||
return this.core.profile.GetAccountDeletionStatus({ userId });
|
||||
}
|
||||
|
||||
@Get('e2e-public-key')
|
||||
@ApiOperation({ summary: 'Получить публичный E2E-ключ пользователя' })
|
||||
async getE2EPublicKey(@Param('userId') userId: string) {
|
||||
return this.core.profile.GetE2EPublicKey({ userId });
|
||||
}
|
||||
|
||||
@Patch('e2e-public-key')
|
||||
@ApiOperation({ summary: 'Сохранить свой публичный E2E-ключ' })
|
||||
async setE2EPublicKey(
|
||||
@Headers('authorization') authorization: string | undefined,
|
||||
@Param('userId') userId: string,
|
||||
@Body() dto: { publicKey: string }
|
||||
) {
|
||||
await this.assertSelfAccess(authorization, userId);
|
||||
return this.core.profile.SetE2EPublicKey({ userId, publicKey: dto.publicKey });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user