Skip to content

Some API endpoints don't return valid JSON #1260

@isAdrisal

Description

@isAdrisal

Describe the bug

/api/v2/scan-files

The above endpoint accepts an application/json payload. The response for a successful POST request is OK, rather than a valid JSON string ("OK").

The docs suggest a valid JSON "string" is returned, as expected for a json endpoint.

To Reproduce

curl -X POST \
-H "Content-Type: application/json" \
-d '{ "data": { "scanConfig": { "dbID": "LIBRARY_ID", "mode": "scanFolderWatcher", "arrayOrPath": ["/path/to/file"] } } }' \
"http://localhost:8265/api/v2/scan-files"

OK

Expected behavior
A valid JSON string (quoted) should be returned, eg. "OK".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions