diff --git a/src/client/app/desktop/views/pages/admin/admin.announcements.vue b/src/client/app/desktop/views/pages/admin/admin.announcements.vue
index 272016b3f9..722fa227cf 100644
--- a/src/client/app/desktop/views/pages/admin/admin.announcements.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.announcements.vue
@@ -1,7 +1,7 @@
-
+
@@ -22,8 +22,21 @@ export default Vue.extend({
},
methods: {
save() {
+ let json;
+
+ try {
+ json = JSON.parse(this.broadcasts);
+ } catch (e) {
+ (this as any).os.apis.dialog({ text: `Failed: ${e}` });
+ return;
+ }
+
(this as any).api('admin/update-meta', {
- broadcasts: JSON.parse(this.broadcasts)
+ broadcasts: json
+ }).then(() => {
+ (this as any).os.apis.dialog({ text: `Saved` });
+ }.catch(e => {
+ (this as any).os.apis.dialog({ text: `Failed ${e}` });
});
}
}
diff --git a/src/client/app/desktop/views/pages/admin/admin.dashboard.vue b/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
index f5734012bd..1b0c5f8125 100644
--- a/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
+++ b/src/client/app/desktop/views/pages/admin/admin.dashboard.vue
@@ -13,7 +13,7 @@
-