croud-layout
Advanced tools
Comparing version 1.10.0 to 1.10.1
{ | ||
"name": "croud-layout", | ||
"main": "src/plugin.js", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"description": "A Vue.js project", | ||
@@ -6,0 +6,0 @@ "author": "Brock <brock.reece@croud.co.uk>", |
@@ -43,3 +43,3 @@ import Vue from 'vue' | ||
if (options.setCroudDefaults) { | ||
axios.defaults.baseURL = `//${gateway_url}` | ||
axios.defaults.baseURL = `${gateway_url.includes('https://') ? '' : '//'}${gateway_url}` | ||
axios.defaults.headers.common.Authorization = `Bearer ${localStorage.getItem('jwt')}` | ||
@@ -46,0 +46,0 @@ axios.defaults.paramsSerializer = params => qs.stringify(params, { arrayFormat: 'brackets' }) |
@@ -31,3 +31,3 @@ // The Vue build version to load with the `import` command | ||
broadcaster: 'socket.io', | ||
host: `//${node_gateway_url}`, | ||
host: `${node_gateway_url.includes('https://') ? '' : '//'}${node_gateway_url}`, | ||
auth: { | ||
@@ -34,0 +34,0 @@ headers: { |
@@ -17,3 +17,3 @@ import VueMoment from 'vue-moment' | ||
broadcaster: 'socket.io', | ||
host: `//${node_gateway_url}`, | ||
host: `${node_gateway_url.includes('https://') ? '' : '//'}${node_gateway_url}`, | ||
auth: { | ||
@@ -20,0 +20,0 @@ headers: { |
@@ -28,3 +28,3 @@ import Vue from 'vue' | ||
load(context) { | ||
Vue.http.get('api/notification', { | ||
return Vue.http.get('api/notification', { | ||
params: { | ||
@@ -55,5 +55,3 @@ per_page: context.state.meta.per_page, | ||
markAllRead(context) { | ||
Vue.http.post('api/notification/read-all').finally(() => { | ||
context.dispatch('load') | ||
}) | ||
return Vue.http.post('api/notification/read-all').then(() => context.dispatch('load')) | ||
}, | ||
@@ -60,0 +58,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
13242660
681
161234