pl-api: fix reports resolving on gotosocial

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2025-02-25 00:18:29 +01:00
parent 8a25b57961
commit e858c5921a
4 changed files with 11 additions and 8 deletions

View File

@ -3767,13 +3767,16 @@ class PlApiClient {
/**
* Mark report as resolved
*
* Mark a report as resolved with no further action taken.
*
* @param action_taken_comment Optional admin comment on the action taken in response to this report. Supported by GoToSocial only.
* @see {@link https://docs.joinmastodon.org/methods/admin/reports/#resolve}
*/
resolveReport: async (reportId: string) => {
resolveReport: async (reportId: string, action_taken_comment?: string) => {
let response;
if (this.features.mastodonAdmin) {
response = await this.request(`/api/v1/admin/reports/${reportId}/resolve`, { method: 'POST' });
response = await this.request(`/api/v1/admin/reports/${reportId}/resolve`, { method: 'POST', body: { action_taken_comment } });
} else {
response = await this.request(`/api/v1/pleroma/admin/reports/${reportId}`, {
method: 'PATCH',

View File

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

View File

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

View File

@ -7548,10 +7548,10 @@ pkg-dir@^4.1.0:
dependencies:
find-up "^4.0.0"
pl-api@^1.0.0-rc.26:
version "1.0.0-rc.26"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.26.tgz#73f31e6b5804b9fbcd5153052f1efa66b8c35e15"
integrity sha512-8QEN15g/HL+Y1CrxxPDx2ZJe3y11mq27qVn49ABJnFXFXtwnFnf2lWJbcf0ZiRQiIUUC06lV0KZdHZ+OcVZxZg==
pl-api@^1.0.0-rc.27:
version "1.0.0-rc.27"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.27.tgz#0d8fb221e6a18be0a81a09c1d19b25e686be3e00"
integrity sha512-BmmdK6JSnj2kLaawalN9C4hymta2hCeWG1zhILJfMhHUxUCFzPlX/PkyjfOZEFLek2EbbRZe/Yd64Z1PovXB0w==
dependencies:
blurhash "^2.0.5"
http-link-header "^1.1.3"