API routes now return proper Responses and basic errors are handled
slight improvements in layouting
This commit is contained in:
@@ -126,7 +126,17 @@
|
||||
bearer: password,
|
||||
}
|
||||
})
|
||||
})
|
||||
});
|
||||
if(res.status === 200){
|
||||
const url = location.href.split('/')
|
||||
url.splice(url.length -1, 1);
|
||||
url.push(short_name)
|
||||
location.assign(url.join('/'))
|
||||
}
|
||||
else{
|
||||
const item = await res.json();
|
||||
alert(item.message)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user