aimeat 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/static/app-catalog.html +12 -21
- package/package.json +1 -1
|
@@ -3261,17 +3261,12 @@
|
|
|
3261
3261
|
var config = loadConfig();
|
|
3262
3262
|
var aimeatUrl = config.aimeatUrl.replace(/\/+$/, '');
|
|
3263
3263
|
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
return fetch(aimeatUrl + '/v1/apps/' + encodeURIComponent(app.publishedFilename), {
|
|
3271
|
-
method: 'DELETE',
|
|
3272
|
-
headers: { 'Authorization': 'Bearer ' + token }
|
|
3273
|
-
});
|
|
3274
|
-
})
|
|
3264
|
+
var token = getCortexOwnerToken();
|
|
3265
|
+
if (!token) { alert('You must be logged in to delete apps. Sign in first.'); return; }
|
|
3266
|
+
fetch(aimeatUrl + '/v1/apps/' + encodeURIComponent(app.publishedFilename), {
|
|
3267
|
+
method: 'DELETE',
|
|
3268
|
+
headers: { 'Authorization': 'Bearer ' + token }
|
|
3269
|
+
})
|
|
3275
3270
|
.then(function(resp) { return resp.json(); })
|
|
3276
3271
|
.then(function(json) {
|
|
3277
3272
|
if (json.ok) {
|
|
@@ -3297,16 +3292,12 @@
|
|
|
3297
3292
|
if (!confirm('Delete "' + filename + '" from the server?')) return;
|
|
3298
3293
|
var config = loadConfig();
|
|
3299
3294
|
var aimeatUrl = config.aimeatUrl.replace(/\/+$/, '');
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
method: 'DELETE',
|
|
3307
|
-
headers: { 'Authorization': 'Bearer ' + token }
|
|
3308
|
-
});
|
|
3309
|
-
})
|
|
3295
|
+
var token = getCortexOwnerToken();
|
|
3296
|
+
if (!token) { alert('You must be logged in to delete apps. Sign in first.'); return; }
|
|
3297
|
+
fetch(aimeatUrl + '/v1/apps/' + encodeURIComponent(filename), {
|
|
3298
|
+
method: 'DELETE',
|
|
3299
|
+
headers: { 'Authorization': 'Bearer ' + token }
|
|
3300
|
+
})
|
|
3310
3301
|
.then(function(resp) { return resp.json(); })
|
|
3311
3302
|
.then(function(json) {
|
|
3312
3303
|
if (json.ok) {
|