fix: แก้ type img
This commit is contained in:
parent
8e84799cff
commit
56c7b6417a
2 changed files with 4 additions and 3 deletions
|
|
@ -50,13 +50,14 @@ const useBranchContactStore = defineStore('api-branch-contact', () => {
|
||||||
async function create(
|
async function create(
|
||||||
branchId: string,
|
branchId: string,
|
||||||
data: BranchContactCreate,
|
data: BranchContactCreate,
|
||||||
|
qrCodeImage: File,
|
||||||
flow?: {
|
flow?: {
|
||||||
sessionId: string;
|
sessionId: string;
|
||||||
refTransactionId: string;
|
refTransactionId: string;
|
||||||
transactionId: string;
|
transactionId: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const { qrCodeImage, ...payload } = data;
|
const { ...payload } = data;
|
||||||
|
|
||||||
const res = await api.post<
|
const res = await api.post<
|
||||||
BranchContact & { qrCodeImageUploadUrl: string }
|
BranchContact & { qrCodeImageUploadUrl: string }
|
||||||
|
|
@ -84,13 +85,14 @@ const useBranchContactStore = defineStore('api-branch-contact', () => {
|
||||||
branchId: string,
|
branchId: string,
|
||||||
contactId: string,
|
contactId: string,
|
||||||
data: Partial<BranchContactCreate>,
|
data: Partial<BranchContactCreate>,
|
||||||
|
qrCodeImage?: File,
|
||||||
flow?: {
|
flow?: {
|
||||||
sessionId: string;
|
sessionId: string;
|
||||||
refTransactionId: string;
|
refTransactionId: string;
|
||||||
transactionId: string;
|
transactionId: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const { qrCodeImage, ...payload } = data;
|
const { ...payload } = data;
|
||||||
|
|
||||||
const res = await api.put<BranchContact & { qrCodeImageUploadUrl: string }>(
|
const res = await api.put<BranchContact & { qrCodeImageUploadUrl: string }>(
|
||||||
`/branch/${branchId}/contact/${contactId}`,
|
`/branch/${branchId}/contact/${contactId}`,
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,4 @@ export type BranchContact = {
|
||||||
export type BranchContactCreate = {
|
export type BranchContactCreate = {
|
||||||
lineId: string;
|
lineId: string;
|
||||||
telephoneNo: string;
|
telephoneNo: string;
|
||||||
qrCodeImage: File;
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue