mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
214b4d4606
3 files changed
+8
-3
No files matched your search
@@ -156,7 +156,9 @@ export default {
|
|||||||
try {
|
try {
|
||||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${editedSubtask.id}`, editedSubtask)
|
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${editedSubtask.id}`, editedSubtask)
|
||||||
this.$events.emit('on-subtask-edited', subtask)
|
this.$events.emit('on-subtask-edited', subtask)
|
||||||
this.$events.emit('show-task-add-time-modal', { subtask })
|
|
||||||
|
if (subtask.employee_id == this.$store.getters['auth/user'].id)
|
||||||
|
this.$events.emit('show-task-add-time-modal', { subtask })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error.message || error)
|
this.$toast.error(error.message || error)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import axios from '@/plugins/w/axios/models/axios'
|
import axios from '@/plugins/w/axios/models/axios'
|
||||||
// import './refreshExpired'
|
import './refreshExpired'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
namespaced: true,
|
namespaced: true,
|
||||||
|
|||||||
@@ -3,7 +3,10 @@ import axios from 'axios'
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
|
|
||||||
async function _unauthorised(error: any) {
|
async function _unauthorised(error: any) {
|
||||||
return store.dispatch('auth/logout')
|
if (error?.response?.data?.message == 'Unauthenticated.')
|
||||||
|
return store.dispatch('auth/logout')
|
||||||
|
|
||||||
|
return error
|
||||||
}
|
}
|
||||||
|
|
||||||
axios.interceptors.response.use(
|
axios.interceptors.response.use(
|
||||||
|
|||||||
Reference in new issue
Block a user