mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-01 04:34:50 -04:00
Clean up 204 handling on the front
This commit is contained in:
parent
74013cf113
commit
ce07cece06
@ -117,9 +117,8 @@ export const queryFn = async <Data,>(
|
|||||||
throw data as KyooErrors;
|
throw data as KyooErrors;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the method is DELETE, 204 NoContent is returned from kyoo.
|
// @ts-expect-error Assume Data is nullable.
|
||||||
// @ts-ignore
|
if (resp.status === 204) return null;
|
||||||
if (context.method === "DELETE") return undefined;
|
|
||||||
|
|
||||||
let data;
|
let data;
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user