mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
19 lines
419 B
JavaScript
19 lines
419 B
JavaScript
function generateNotify(message, type) {
|
|
// type = danger, warning, info, successs
|
|
$.notify({
|
|
// options
|
|
message: message
|
|
}, {
|
|
// settings
|
|
type: type
|
|
});
|
|
}
|
|
|
|
function checkJsonResponse(response) {
|
|
if (response.result === true) {
|
|
return true;
|
|
} else {
|
|
generateNotify(response.message, "warning");
|
|
return false;
|
|
}
|
|
}
|