Merge pull request #1 from askotx/appserv

Retrieve roles from user data service
This commit is contained in:
Juan Carlos Ruvalcaba 2021-04-30 13:33:34 -07:00 committed by GitHub
commit d04935afcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ const user = createStore({
const token = response.data.token;
delete response.data.token;
const user = response.data.user;
const roles = [1, 4, 14]; //Owner, Customer, Seller, Deliverer//response.data.roles;
const roles = response.data.roles; //[1, 4, 14]; //Owner, Customer, Seller, Deliverer
http.defaults.headers.common['Authorization'] = token;
await dispatch('setBasicData', { token, user, roles });
return response;