You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't exactly a bug — the Write.as/WriteFreely API doesn't return collection information on the GET /api/collections/{COLLECTION_ALIAS}/posts/{SLUG} endpoint (or GET /api/posts/{POST_ID}, for that matter), so technically this method on WFClient follows that behaviour.
It does, however, mean that you get back a WFPost whose collectionAlias property is nil — which is unexpected, given that you asked the API to fetch a post from some specific collection.
And so, I'm categorizing this as a bug: on success, the method should insert the collection alias that it was given back into the WFPost object that is returned to the completion handler.
Workaround: Don't overwrite the post's collection alias in your client's completion handler for this method (or, keep a reference to that collection alias, and re-insert it into your client's post type).
The text was updated successfully, but these errors were encountered:
This isn't exactly a bug — the Write.as/WriteFreely API doesn't return collection information on the
GET /api/collections/{COLLECTION_ALIAS}/posts/{SLUG}
endpoint (orGET /api/posts/{POST_ID}
, for that matter), so technically this method on WFClient follows that behaviour.It does, however, mean that you get back a WFPost whose
collectionAlias
property isnil
— which is unexpected, given that you asked the API to fetch a post from some specific collection.And so, I'm categorizing this as a bug: on success, the method should insert the collection alias that it was given back into the WFPost object that is returned to the completion handler.
Workaround: Don't overwrite the post's collection alias in your client's completion handler for this method (or, keep a reference to that collection alias, and re-insert it into your client's post type).
The text was updated successfully, but these errors were encountered: