Bug fix: Save fingerprint.

Bug fix: Show error whey device isn't plugged.
This commit is contained in:
2021-12-08 16:14:57 +01:00
parent 62ed8744f2
commit 71b5c01adc
3 changed files with 10 additions and 2 deletions
+8 -2
View File
@@ -34,6 +34,12 @@ var app = new Vue({
this.socket.on("connect", () => { })
this.socket.on("fprint-enroll-error", (data) => {
console.log({ event: 'enroll-error', data });
swal("Oops!", `Operation failed. ${data}.`, "error");
this.busy.login = false;
});
this.socket.on("fprint-enroll-done", (data) => {
console.log({ event: 'enroll-done', data});
if (data.ok) {
@@ -102,10 +108,10 @@ var app = new Vue({
saveFingerPrint: async function () {
this.busy.login = true;
try {
var fingerprints = Object.keys(this.fingerprints).map(finger => {
var fingerprints = Object.keys(this.fingerDetails).map(finger => {
return {
finger,
fingerprint: this.fingerprints[finger]
fingerprint: this.fingerDetails[finger]
}
});
var { data } = await axios.post(