feat(backend): add DELETE /members/{id}

This commit is contained in:
Sam 2022-11-22 13:31:42 +01:00
parent 3aefe4fa88
commit 3b64ba33f6
4 changed files with 65 additions and 3 deletions

View file

@ -27,6 +27,6 @@ export default async function fetchAPI<T>(
});
const data = await resp.json();
if (resp.status !== 200) throw data as APIError;
if (resp.status < 200 || resp.status >= 300) throw data as APIError;
return data as T;
}