#7 added errorPages
All checks were successful
CSGOWTF/csgowtf/pipeline/head This commit looks good

This commit is contained in:
2021-11-23 10:33:24 +01:00
parent 21bf749556
commit 44d6a97fb4
12 changed files with 151 additions and 83 deletions

View File

@@ -113,9 +113,9 @@ export default {
}
if (store.state.id64 !== '' || store.state.vanityUrl !== '') {
const [res, resData] = await GetUser(store.state.vanityUrl || store.state.id64)
const resData = await GetUser(store.state.vanityUrl || store.state.id64)
if (res === 200) {
if (resData) {
data.searchInput = ''
document.activeElement.blur()
@@ -131,17 +131,6 @@ export default {
closeNav('mainNav')
GoToPlayer(store.state.id64)
}
} else if (res === 404) {
data.searchInput = ''
data.error = `${resData} - Try again`
// TODO: needs 404
} else if (res === 502) {
data.searchInput = ''
data.error = 'Server not available'
} else {
console.log(res, resData)
// TODO: needs 404
}
}