removed duplicated operation on home mounted

fixed authorization error due to null token
This commit is contained in:
Jack Goh
2018-08-29 10:31:30 +08:00
parent dfe092f89c
commit 6ed5e3d85a
4 changed files with 7 additions and 5 deletions
@@ -17,6 +17,7 @@ class BroadcastServiceProvider extends ServiceProvider
//Broadcast::routes(["middleware" => ["auth:api"]]);
Broadcast::routes();
require base_path('routes/channels.php');
}
}
+3 -3
View File
@@ -1,7 +1,7 @@
{
"/js/lang-zh-CN.1d85218e91cf5373a2cc.js": "/js/lang-zh-CN.1d85218e91cf5373a2cc.js",
"/js/lang-es.95673cce1181da797103.js": "/js/lang-es.95673cce1181da797103.js",
"/js/lang-en.71b5c82148a8ff46b281.js": "/js/lang-en.71b5c82148a8ff46b281.js",
"/js/lang-zh-CN.c0da3973e52421a8cfe5.js": "/js/lang-zh-CN.c0da3973e52421a8cfe5.js",
"/js/lang-es.f4a1a5b4a30e92527b46.js": "/js/lang-es.f4a1a5b4a30e92527b46.js",
"/js/lang-en.0f790217417404ecc662.js": "/js/lang-en.0f790217417404ecc662.js",
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css"
}
+3 -1
View File
@@ -92,6 +92,7 @@ import LocaleDropdown from './LocaleDropdown'
import axios from 'axios'
import Echo from "laravel-echo"
import Pusher from "pusher-js"
import store from '~/store'
export default {
components: {
@@ -192,9 +193,10 @@ export default {
key: window.config.pusherUrl,
cluster: 'ap1',
encrypted: true,
authEndpoint: 'broadcasting/auth',
auth: {
headers: {
Authorization: 'Bearer ' + localStorage.getItem("token")
Authorization: 'Bearer ' + store.getters['auth/token'],
},
},
-1
View File
@@ -519,7 +519,6 @@ export default {
}
},
mounted () {
this.getBooking();
this.initBooking();
this.getRate();
this.getBookingTableComplete();