refactor: drop support old presign url returned by api
This commit is contained in:
parent
07c989d4e6
commit
8ffecc9146
2 changed files with 3 additions and 11 deletions
|
|
@ -558,7 +558,7 @@ function triggerDelete(id: string) {
|
||||||
async function triggerChangeStatus(
|
async function triggerChangeStatus(
|
||||||
id: string,
|
id: string,
|
||||||
status: string,
|
status: string,
|
||||||
): Promise<Branch & { qrCodeImageUploadUrl: string; imageUploadUrl: string }> {
|
): Promise<Branch> {
|
||||||
return await new Promise((resolve) => {
|
return await new Promise((resolve) => {
|
||||||
dialog({
|
dialog({
|
||||||
color: status !== 'INACTIVE' ? 'warning' : 'info',
|
color: status !== 'INACTIVE' ? 'warning' : 'info',
|
||||||
|
|
|
||||||
|
|
@ -90,13 +90,7 @@ const useBranchStore = defineStore('api-branch', () => {
|
||||||
async function create(branch: BranchCreate, bank?: BankBook[]) {
|
async function create(branch: BranchCreate, bank?: BankBook[]) {
|
||||||
const { qrCodeImage, imageUrl, ...payload } = branch;
|
const { qrCodeImage, imageUrl, ...payload } = branch;
|
||||||
|
|
||||||
const res = await api.post<
|
const res = await api.post<Branch>(
|
||||||
Branch & {
|
|
||||||
qrCodeImageUrl: string;
|
|
||||||
qrCodeImageUploadUrl: string;
|
|
||||||
imageUploadUrl: string;
|
|
||||||
}
|
|
||||||
>(
|
|
||||||
'/branch',
|
'/branch',
|
||||||
{ ...payload, bank: bank },
|
{ ...payload, bank: bank },
|
||||||
{ headers: { 'X-Rtid': flowStore.rtid } },
|
{ headers: { 'X-Rtid': flowStore.rtid } },
|
||||||
|
|
@ -133,9 +127,7 @@ const useBranchStore = defineStore('api-branch', () => {
|
||||||
bank?: BankBook[],
|
bank?: BankBook[],
|
||||||
) {
|
) {
|
||||||
const { ...payload } = data;
|
const { ...payload } = data;
|
||||||
const res = await api.put<
|
const res = await api.put<Branch>(
|
||||||
Branch & { qrCodeImageUploadUrl: string; imageUploadUrl: string }
|
|
||||||
>(
|
|
||||||
`/branch/${id}`,
|
`/branch/${id}`,
|
||||||
{ ...payload, bank: bank },
|
{ ...payload, bank: bank },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue