Add autoupdate pattern dialog

This commit is contained in:
Johannes Zellner
2025-01-24 14:00:33 +01:00
parent 837d5803c8
commit 63ee99fde9
6 changed files with 260 additions and 17 deletions
+2 -7
View File
@@ -3,7 +3,6 @@ import { fetcher } from 'pankow';
function create(origin, accessToken) {
return {
name: 'DashboardModel',
async getConfig() {
let error, result;
try {
@@ -12,12 +11,8 @@ function create(origin, accessToken) {
error = e;
}
if (error || result.status !== 200) {
console.error('Failed to get dashboard config.', error || result.status);
return {};
}
return result.body;
if (error || result.status !== 200) return [error || result];
return [null, result.body];
},
};
}