diff --git a/webapp/src/utils/authentication.ts b/webapp/src/utils/authentication.ts index e0e96b705..0f1debd03 100644 --- a/webapp/src/utils/authentication.ts +++ b/webapp/src/utils/authentication.ts @@ -65,7 +65,7 @@ export function login(username: string, password: string) { }); } -export function handleResponse(response: Response, emitter: Emitter>, router: Router) { +export function handleResponse(response: Response, emitter: Emitter>, router: Router, ignore_error: boolean = false) { return response.text().then(text => { const data = text && JSON.parse(text); if (!response.ok) { @@ -78,7 +78,9 @@ export function handleResponse(response: Response, emitter: Emitter handleResponse(response, this.$emitter, this.$router)) + .then((response) => handleResponse(response, this.$emitter, this.$router, true)) .then( (data) => { this.pinMappingList = data; @@ -246,6 +246,9 @@ export default defineComponent({ .then( (data) => { this.deviceConfigList = data; + if (this.deviceConfigList.curPin.name === "") { + this.deviceConfigList.curPin.name = "Default"; + } this.dataLoading = false; } )