fimfiction-issues icon indicating copy to clipboard operation
fimfiction-issues copied to clipboard

API does not update relationships

Open Lithl opened this issue 7 years ago • 2 comments

PATCH /api/v2/stories/:id

Specifically tested with the above endpoint, but the problem may affect other endpoints as well. relationships are not updated at all with the PATCH request. With the above endpoint, this largely means updating the story's tags and setting the prequel story.

Lithl avatar Sep 11 '17 20:09 Lithl

Just tested this endpoint again, attempting to set a story's prequel:

PATCH https://www.fimfiction.net/api/v2/stories/102705
{
  "data": {
    "type": "story",
    "attributes": {
      "title": "...",
      "short_description": "...",
      "description": "...",
      "completion_status": "incomplete",
      "content_rating": "teen"
    },
    "relationships": {
      "prequel": {
        "data": {
          "type": "story",
          "id": "60063"
        }
      }
    }
  }
}

The response:

{
  "errors": [{
    "status": "422",
    "title": "Unsupported attribute submitted",
    "detail": null,
    "code": 4226,
    "meta": {
      "attribute": "prequel"
    },
    "links": {
      "about": "https://www.fimfiction.net/developers/api/v2/docs/error-codes#4226"
    }
  }]
}

When this issue was created, there was no error response, the attempt simply did nothing.

Lithl avatar Dec 22 '17 22:12 Lithl

Update: Just tested, this PATCH request still produces the same error response.

Lithl avatar Jan 28 '20 23:01 Lithl