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 272016b3f..722fa227c 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 f5734012b..1b0c5f812 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 @@ -
+