1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-15 12:50:05 +00:00

feat(profile-picture): allow reset of profile picture (#355)

Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
Kyle Mendell
2025-03-18 14:59:31 -05:00
committed by GitHub
parent a0f93bda49
commit 8f146188d5
6 changed files with 156 additions and 31 deletions

View File

@@ -59,6 +59,14 @@ export default class UserService extends APIService {
await this.api.put('/users/me/profile-picture', formData);
}
async resetCurrentUserProfilePicture() {
await this.api.delete(`/users/me/profile-picture`);
}
async resetProfilePicture(userId: string) {
await this.api.delete(`/users/${userId}/profile-picture`);
}
async createOneTimeAccessToken(expiresAt: Date, userId: string) {
const res = await this.api.post(`/users/${userId}/one-time-access-token`, {
userId,