fix: แก้ type img

This commit is contained in:
Net 2024-04-10 18:48:47 +07:00
parent 8e84799cff
commit 56c7b6417a
2 changed files with 4 additions and 3 deletions

View file

@ -50,13 +50,14 @@ const useBranchContactStore = defineStore('api-branch-contact', () => {
async function create(
branchId: string,
data: BranchContactCreate,
qrCodeImage: File,
flow?: {
sessionId: string;
refTransactionId: string;
transactionId: string;
},
) {
const { qrCodeImage, ...payload } = data;
const { ...payload } = data;
const res = await api.post<
BranchContact & { qrCodeImageUploadUrl: string }
@ -84,13 +85,14 @@ const useBranchContactStore = defineStore('api-branch-contact', () => {
branchId: string,
contactId: string,
data: Partial<BranchContactCreate>,
qrCodeImage?: File,
flow?: {
sessionId: string;
refTransactionId: string;
transactionId: string;
},
) {
const { qrCodeImage, ...payload } = data;
const { ...payload } = data;
const res = await api.put<BranchContact & { qrCodeImageUploadUrl: string }>(
`/branch/${branchId}/contact/${contactId}`,

View file

@ -13,5 +13,4 @@ export type BranchContact = {
export type BranchContactCreate = {
lineId: string;
telephoneNo: string;
qrCodeImage: File;
};