mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[Axios] Error logger
This commit is contained in:
1 parent
886a44229f
commit
da63ed5ed2
1 file changed
+15
-2
@@ -26,7 +26,7 @@ export class I18n {
|
|||||||
postTranslation: this._postTranslation,
|
postTranslation: this._postTranslation,
|
||||||
})
|
})
|
||||||
|
|
||||||
this.changeLanguage({title: "Slovenský", flag: "sk", value: "sk"})
|
this.changeLanguage({ title: "Slovenský", flag: "sk", value: "sk" })
|
||||||
this.initCurrentLanguage()
|
this.initCurrentLanguage()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,6 +76,19 @@ export class I18n {
|
|||||||
|
|
||||||
return config
|
return config
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// axios.interceptors.response.use(
|
||||||
|
// (response) => {
|
||||||
|
// return response
|
||||||
|
// },
|
||||||
|
// (error) => {
|
||||||
|
// axios.post('https://logger.wezeo.dev/api/v1/log', {
|
||||||
|
// data: JSON.stringify(error)
|
||||||
|
// })
|
||||||
|
|
||||||
|
// return Promise.reject(error)
|
||||||
|
// }
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
public _loadLocaleMessages(path = '@/locales') {
|
public _loadLocaleMessages(path = '@/locales') {
|
||||||
@@ -91,7 +104,7 @@ export class I18n {
|
|||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const messages: {[key: string]: {[key: string]: string}} = {}
|
const messages: { [key: string]: { [key: string]: string } } = {}
|
||||||
|
|
||||||
locales.keys().forEach((key) => {
|
locales.keys().forEach((key) => {
|
||||||
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
|
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
|
||||||
|
|||||||
Reference in new issue
Block a user