fix user profile update
This commit is contained in:
+20
-1
@@ -4,7 +4,26 @@ import { getCurrentStoreId, withCurrentStoreId, withCurrentStorePage } from "@/u
|
||||
|
||||
const BASE_URI = "/gao/event";
|
||||
|
||||
async function list(req: Page<EventItem>): Promise<PageResult<EventItem>> {
|
||||
type ListOptions = {
|
||||
allStores?: boolean;
|
||||
storeId?: string;
|
||||
};
|
||||
|
||||
async function list(req: Page<EventItem>, options?: ListOptions): Promise<PageResult<EventItem>> {
|
||||
if (options?.allStores) {
|
||||
return await axios.post(`${BASE_URI}/list`, req);
|
||||
}
|
||||
|
||||
if (options?.storeId) {
|
||||
return await axios.post(`${BASE_URI}/list`, {
|
||||
...req,
|
||||
equalsExample: {
|
||||
...(req.equalsExample || {}),
|
||||
storeId: options.storeId
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return await axios.post(`${BASE_URI}/list`, withCurrentStorePage(req));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user