fix type error. 204 status response casts to any type. #3

Closed
marihachi wants to merge 1 commit from work/api-request-1 into master

View file

@ -22,7 +22,7 @@ export function request<E extends keyof Endpoints>(
if (res.status === 200) {
resolve(body);
} else if (res.status === 204) {
resolve(null);
resolve(null as any);
} else {
reject(body.error);
}