pl-api: Support password change on Pixelfed

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2024-12-27 20:11:07 +01:00
parent 98bdd79da5
commit aedcff4f8a
5 changed files with 18 additions and 6 deletions

View File

@@ -1296,6 +1296,17 @@ class PlApiClient {
body: { new_password },
});
break;
case PIXELFED:
response = await this.request('/api/v1.1/accounts/change-password', {
method: 'POST',
body: {
current_password,
new_password,
confirm_password: new_password,
},
});
if (response.redirected) throw response;
break;
default:
response = await this.request('/api/pleroma/change_password', {
method: 'POST',