refactor: drop support old presign url returned by api

This commit is contained in:
Methapon Metanipat 2024-09-05 09:56:22 +07:00
parent 07c989d4e6
commit 8ffecc9146
2 changed files with 3 additions and 11 deletions

View file

@ -558,7 +558,7 @@ function triggerDelete(id: string) {
async function triggerChangeStatus(
id: string,
status: string,
): Promise<Branch & { qrCodeImageUploadUrl: string; imageUploadUrl: string }> {
): Promise<Branch> {
return await new Promise((resolve) => {
dialog({
color: status !== 'INACTIVE' ? 'warning' : 'info',

View file

@ -90,13 +90,7 @@ const useBranchStore = defineStore('api-branch', () => {
async function create(branch: BranchCreate, bank?: BankBook[]) {
const { qrCodeImage, imageUrl, ...payload } = branch;
const res = await api.post<
Branch & {
qrCodeImageUrl: string;
qrCodeImageUploadUrl: string;
imageUploadUrl: string;
}
>(
const res = await api.post<Branch>(
'/branch',
{ ...payload, bank: bank },
{ headers: { 'X-Rtid': flowStore.rtid } },
@ -133,9 +127,7 @@ const useBranchStore = defineStore('api-branch', () => {
bank?: BankBook[],
) {
const { ...payload } = data;
const res = await api.put<
Branch & { qrCodeImageUploadUrl: string; imageUploadUrl: string }
>(
const res = await api.put<Branch>(
`/branch/${id}`,
{ ...payload, bank: bank },
{