pl-api: update software support
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -3942,7 +3942,7 @@ class PlApiClient {
|
|||||||
deleteAccount: async (accountId: string) => {
|
deleteAccount: async (accountId: string) => {
|
||||||
let response;
|
let response;
|
||||||
|
|
||||||
if (this.features.mastodonAdmin) {
|
if (this.features.mastodonAdmin || this.features.version.software === MITRA) {
|
||||||
response = await this.request(`/api/v1/admin/accounts/${accountId}`, { method: 'DELETE' });
|
response = await this.request(`/api/v1/admin/accounts/${accountId}`, { method: 'DELETE' });
|
||||||
} else {
|
} else {
|
||||||
const account = await this.admin.accounts.getAccount(accountId)!;
|
const account = await this.admin.accounts.getAccount(accountId)!;
|
||||||
@ -4387,7 +4387,13 @@ class PlApiClient {
|
|||||||
* @see {@link https://docs.pleroma.social/backend/development/API/admin_api/#delete-apiv1pleromaadminstatusesid}
|
* @see {@link https://docs.pleroma.social/backend/development/API/admin_api/#delete-apiv1pleromaadminstatusesid}
|
||||||
*/
|
*/
|
||||||
deleteStatus: async (statusId: string) => {
|
deleteStatus: async (statusId: string) => {
|
||||||
const response = await this.request(`/api/v1/pleroma/admin/statuses/${statusId}`, { method: 'DELETE' });
|
let response;
|
||||||
|
|
||||||
|
if (this.features.version.software === MITRA) {
|
||||||
|
response = await this.request(`/api/v1/admin/posts/${statusId}`, { method: 'DELETE' });
|
||||||
|
} else {
|
||||||
|
response = await this.request(`/api/v1/pleroma/admin/statuses/${statusId}`, { method: 'DELETE' });
|
||||||
|
}
|
||||||
|
|
||||||
return response.json as {};
|
return response.json as {};
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user