Make it possible for flag some tasks as non-disableable

This commit is contained in:
abdulmohsen
2024-08-18 00:34:30 +03:00
parent d7f239ae37
commit 91e5b0cbc9
4 changed files with 42 additions and 18 deletions

View File

@@ -465,6 +465,14 @@ const basename = (path, ext = '') => {
return base
}
const parse_api_response = async r => {
try {
return await r.json()
} catch (e) {
return {error: {code: r.status, message: r.statusText}}
}
}
export {
r,
ag_set,
@@ -485,5 +493,6 @@ export {
TOOLTIP_DATE_FORMAT,
makeSecret,
explode,
basename
basename,
parse_api_response,
}