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',

View File

@ -1220,6 +1220,7 @@ const getFeatures = (instance: Instance) => {
changePassword: any([
v.software === GOTOSOCIAL,
v.software === MITRA,
v.software === PIXELFED,
v.software === PLEROMA,
]),

View File

@ -1,6 +1,6 @@
{
"name": "pl-api",
"version": "1.0.0-rc.8",
"version": "1.0.0-rc.9",
"type": "module",
"homepage": "https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-api",
"repository": {

View File

@ -101,7 +101,7 @@
"multiselect-react-dropdown": "^2.0.25",
"mutative": "^1.1.0",
"path-browserify": "^1.0.1",
"pl-api": "^1.0.0-rc.8",
"pl-api": "^1.0.0-rc.9",
"postcss": "^8.4.49",
"process": "^0.11.10",
"punycode": "^2.1.1",

View File

@ -8136,10 +8136,10 @@ pkg-dir@^4.1.0:
dependencies:
find-up "^4.0.0"
pl-api@^1.0.0-rc.8:
version "1.0.0-rc.8"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.8.tgz#d7f4da5e35ec0e5085ac8cbc58f450916190a6ee"
integrity sha512-FIQEjW3yUaRGypc0IwwnHVlEuA/fK6uH1/4GHIdT2u0cbyypYTqEg6BftjTNGui/FUscfKcsXJ55EFlNBy5r9Q==
pl-api@^1.0.0-rc.9:
version "1.0.0-rc.9"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.9.tgz#00cd1da974821f080738501493f2a3ec7906357a"
integrity sha512-MAKPfCZJkbofCzQRupfeEv/Eqrq15oMxxY0CWlxqjS7rU3M49ciIIK1mFeb+ySWFGZ1IvxKQ2MPFa9jKEdDtfg==
dependencies:
blurhash "^2.0.5"
http-link-header "^1.1.3"