|
|
|
@@ -302,16 +302,13 @@ export const autoAssignAndReleasePickOrderByStore = async ( |
|
|
|
userId: number, |
|
|
|
storeId: string |
|
|
|
): Promise<AutoAssignReleaseResponse> => { |
|
|
|
const payload: AutoAssignReleaseByStoreRequest = { userId, storeId }; |
|
|
|
const response = await serverFetchJson<AutoAssignReleaseResponse>( |
|
|
|
`${BASE_API_URL}/pickOrder/auto-assign-release-by-store`, |
|
|
|
{ |
|
|
|
method: "POST", |
|
|
|
headers: { "Content-Type": "application/json" }, |
|
|
|
body: JSON.stringify(payload), |
|
|
|
next: { tags: ["pickorder"] }, |
|
|
|
} |
|
|
|
); |
|
|
|
const url = `${BASE_API_URL}/pickOrder/auto-assign-release-by-store?userId=${userId}&storeId=${encodeURIComponent(storeId)}`; |
|
|
|
const response = await serverFetchJson<AutoAssignReleaseResponse>(url, { |
|
|
|
method: "POST", |
|
|
|
headers: { "Content-Type": "application/json" }, |
|
|
|
// no body |
|
|
|
next: { tags: ["pickorder"] }, |
|
|
|
}); |
|
|
|
revalidateTag("pickorder"); |
|
|
|
return response; |
|
|
|
}; |
|
|
|
|