mirror of
https://github.com/nullnyat/NullcatChan.git
synced 2025-04-29 08:17:23 +09:00
[fix] http 204 parse json
This commit is contained in:
parent
c0ed039fc2
commit
a0ae935ada
@ -427,7 +427,14 @@ export default class 藍 {
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
...{ i: config.i }, ...param
|
...{ i: config.i }, ...param
|
||||||
}),
|
}),
|
||||||
}).then(res => res.json());
|
}).then(res => {
|
||||||
|
if(res.status != 204)
|
||||||
|
return res.json();
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(JSON.parse("{}"));
|
||||||
|
})
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user