Skip to content

Commit

Permalink
+update: detect device
Browse files Browse the repository at this point in the history
  • Loading branch information
wilmerace2793 committed Aug 21, 2024
1 parent 8bf8e1f commit b9a4399
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _store/auth/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getTokenFirebase } from 'modules/qnotification/_plugins/firebase.js'
//Request Login
export const AUTH_REQUEST = ({ commit, dispatch, state }, authData) => {
return new Promise(async (resolve, reject) => {
let dataRequest = { username: authData.username, password: authData.password }
let dataRequest = { username: authData.username, password: authData.password, device: helper.detectDevice() }
axios.defaults.headers.common['Authorization'] = null;
//Request login
axios.defaults.params.setting.authProvider = 'local';
Expand All @@ -32,7 +32,7 @@ export const AUTH_SOCIAL_NETWORK = ({ dispatch, state }, params) => {
return new Promise((resolve, reject) => {
let requestUrl = `apiRoutes.quser.authLoginSocialNetwork`
const socialData = params.socialData ? params.socialData : '';
let requestParams = { attributes: { token: params.token, socialData }, type: params.type }
let requestParams = { attributes: { token: params.token, socialData, device: helper.detectDevice()}, type: params.type }
axios.defaults.params.setting.authProvider = params.type;
axios.defaults.headers.common['Authorization'] = null;
crud.post(requestUrl, requestParams).then(async response => {
Expand Down

0 comments on commit b9a4399

Please sign in to comment.