pl-api: Fix account aliases management
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
@ -1218,7 +1218,7 @@ class PlApiClient {
|
||||
* @see {@link https://docs.pleroma.social/backend/development/API/pleroma_api/#get-aliases-of-the-current-account}
|
||||
*/
|
||||
getAccountAliases: async () => {
|
||||
const response = await this.request('/api/v1/pleroma/aliases');
|
||||
const response = await this.request('/api/pleroma/aliases');
|
||||
|
||||
return v.parse(v.object({ aliases: filteredArray(v.string()) }), response.json);
|
||||
},
|
||||
@ -1231,7 +1231,7 @@ class PlApiClient {
|
||||
* @see {@link https://docs.pleroma.social/backend/development/API/pleroma_api/#add-alias-to-the-current-account}
|
||||
*/
|
||||
addAccountAlias: async (alias: string) => {
|
||||
const response = await this.request('/api/v1/pleroma/aliases', { method: 'PUT', body: { alias } });
|
||||
const response = await this.request('/api/pleroma/aliases', { method: 'PUT', body: { alias } });
|
||||
|
||||
return v.parse(v.object({ status: v.literal('success') }), response.json);
|
||||
},
|
||||
@ -1244,7 +1244,7 @@ class PlApiClient {
|
||||
* @see {@link https://docs.pleroma.social/backend/development/API/pleroma_api/#delete-alias-from-the-current-account}
|
||||
*/
|
||||
deleteAccountAlias: async (alias: string) => {
|
||||
const response = await this.request('/api/v1/pleroma/aliases', { method: 'DELETE', body: { alias } });
|
||||
const response = await this.request('/api/pleroma/aliases', { method: 'DELETE', body: { alias } });
|
||||
|
||||
return v.parse(v.object({ status: v.literal('success') }), response.json);
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pl-api",
|
||||
"version": "1.0.0-rc.17",
|
||||
"version": "1.0.0-rc.18",
|
||||
"type": "module",
|
||||
"homepage": "https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-api",
|
||||
"repository": {
|
||||
|
||||
@ -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.17",
|
||||
"pl-api": "^1.0.0-rc.18",
|
||||
"postcss": "^8.4.49",
|
||||
"process": "^0.11.10",
|
||||
"punycode": "^2.1.1",
|
||||
|
||||
@ -7543,10 +7543,10 @@ pkg-dir@^4.1.0:
|
||||
dependencies:
|
||||
find-up "^4.0.0"
|
||||
|
||||
pl-api@^1.0.0-rc.17:
|
||||
version "1.0.0-rc.17"
|
||||
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.17.tgz#734137137bcf21bd1dc20b39c7971e6c3546f048"
|
||||
integrity sha512-2QKWWRXwa0JxNbJ2f7A3CDQ197dp9FcJ71FIkieFZ1AxyV6ZtLRdQudh/gJRU461MM2g/Pnsn5o0Ck1/mialnA==
|
||||
pl-api@^1.0.0-rc.18:
|
||||
version "1.0.0-rc.18"
|
||||
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.18.tgz#8a95389dff03bee9acd10316bcdbcdd6fc57dcc4"
|
||||
integrity sha512-H9cKi2vzbjj2C4/ieFxSFdGeDBk8EbiZZ2fIXGKEQscTh2YkHEyFibOoVo5hjegbMKMbTxKW5t9Kr8dlHtJEAw==
|
||||
dependencies:
|
||||
blurhash "^2.0.5"
|
||||
http-link-header "^1.1.3"
|
||||
|
||||
Reference in New Issue
Block a user