updated
This commit is contained in:
parent
dbf6fe0123
commit
97b07f9e38
1 changed files with 12 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ import { ref } from "vue";
|
|||
import { defineStore } from "pinia";
|
||||
import { useCounterMixin } from "./mixin";
|
||||
|
||||
const { messageError, success,hideLoader } = useCounterMixin();
|
||||
const { messageError, success, hideLoader } = useCounterMixin();
|
||||
|
||||
export const useLinkageStore = defineStore("linkageData", () => {
|
||||
const apiURL = ref<string>("http://127.0.0.1:51548"); // API URL From Agent
|
||||
|
|
@ -89,7 +89,16 @@ export const useLinkageStore = defineStore("linkageData", () => {
|
|||
fetch(`${apiURL.value}/smart-card/read/`, {
|
||||
method: "POST",
|
||||
body: JSON.stringify({
|
||||
fields: ["personalID", "engName", "expireDate"],
|
||||
fields: [
|
||||
"personalID",
|
||||
"thaiName",
|
||||
"engName",
|
||||
"dateOfBirth",
|
||||
"addressOnCard",
|
||||
"faceImage",
|
||||
"issueDate",
|
||||
"expireDate",
|
||||
],
|
||||
}),
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
|
@ -277,7 +286,7 @@ export const useLinkageStore = defineStore("linkageData", () => {
|
|||
})
|
||||
.catch(async (error) => {
|
||||
messageError(q, error);
|
||||
hideLoader()
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue