Clean up 204 handling on the front

This commit is contained in:
Zoe Roux 2023-12-05 01:52:10 +01:00
parent 74013cf113
commit ce07cece06

View File

@ -117,9 +117,8 @@ export const queryFn = async <Data,>(
throw data as KyooErrors;
}
// If the method is DELETE, 204 NoContent is returned from kyoo.
// @ts-ignore
if (context.method === "DELETE") return undefined;
// @ts-expect-error Assume Data is nullable.
if (resp.status === 204) return null;
let data;
try {