appstore: removed old route and rename to reset_cloudron_id

This commit is contained in:
Girish Ramakrishnan
2025-06-06 10:38:05 +02:00
parent 53037c96cf
commit c49050ea69
4 changed files with 9 additions and 129 deletions
+1 -12
View File
@@ -42,21 +42,10 @@ function create() {
if (error || result.status !== 200) return [error || result];
return [null, result.body];
},
async register(setupToken) {
let result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/appstore/register_cloudron_with_setup_token`, { setupToken }, { access_token: accessToken });
} catch (e) {
return [e];
}
if (result.status !== 201) return [result];
return [null];
},
async resetCloudronId() {
let result;
try {
result = await fetcher.post(`${API_ORIGIN}/api/v1/appstore/reset_cloudron`, {}, { access_token: accessToken });
result = await fetcher.post(`${API_ORIGIN}/api/v1/appstore/reset_cloudron_id`, {}, { access_token: accessToken });
} catch (e) {
return [e];
}