Initial work on moving domain view to vue

This commit is contained in:
Johannes Zellner
2025-01-27 22:20:26 +01:00
parent 42ce3cb405
commit 70b15d128a
12 changed files with 474 additions and 13 deletions
+22
View File
@@ -14,6 +14,28 @@ function create(origin, accessToken) {
if (error || result.status !== 200) return [error || result];
return [null, result.body];
},
async prepareDomain(domain) {
let error, result;
try {
result = await fetcher.post(`${origin}/api/v1/dashboard/prepare_location`, { domain }, { access_token: accessToken });
} catch (e) {
error = e;
}
if (error || result.status !== 202) return [error || result];
return [null, result.body.taskId];
},
async setDomain(domain) {
let error, result;
try {
result = await fetcher.post(`${origin}/api/v1/dashboard/location`, { domain }, { access_token: accessToken });
} catch (e) {
error = e;
}
if (error || result.status !== 204) return [error || result];
return [null];
},
};
}