alova - refactor wifi scan

This commit is contained in:
Proddy
2023-06-18 10:46:50 +02:00
parent ed55a96b80
commit b1d666d7b9
14 changed files with 58 additions and 60 deletions

View File

@@ -35,9 +35,10 @@ export const alovaInstance = createAlova({
responded: {
onSuccess: async (response) => {
if (response.status === 202) {
throw new Error('Wait');
} else if (response.status === 205) {
// if (response.status === 202) {
// throw new Error('Wait'); // wifi scan in progress
// } else
if (response.status === 205) {
throw new Error('Reboot required');
} else if (response.status === 400) {
throw new Error('Request Failed');