From bb90c890cb49cf2cad6ab49d1273f7e92346dfbd Mon Sep 17 00:00:00 2001 From: silverpill Date: Sun, 19 Feb 2023 19:36:05 +0000 Subject: [PATCH] Expect /api/v1/statuses to return status code 200 --- CHANGELOG.md | 1 + src/api/posts.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b330bb..a3b5a7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Use `/api/v1/statuses/{status_id}/thread` API endpoint to load threads. - Use `` for search bar. - Changed custom emoji vertical alignment and size. +- Expect `/api/v1/statuses` to return status code 200. ## [1.13.0] - 2023-02-06 diff --git a/src/api/posts.ts b/src/api/posts.ts index 84cecad..1b49c0f 100644 --- a/src/api/posts.ts +++ b/src/api/posts.ts @@ -230,7 +230,7 @@ export async function createPost( authToken, }) const data = await response.json() - if (response.status !== 201) { + if (response.status !== 200) { throw new Error(data.message) } return data