add store
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { axios, type Page, type PageResult, type Role } from "timi-web";
|
||||
import type { ManagedUser } from "@/types/ManagedUser";
|
||||
import { withCurrentStoreId, withCurrentStorePage } from "@/utils/store";
|
||||
|
||||
const BASE_URI = "/gao/user";
|
||||
|
||||
async function list(page: Page<ManagedUser>): Promise<PageResult<ManagedUser>> {
|
||||
return await axios.post(`${BASE_URI}/list`, page);
|
||||
return await axios.post(`${BASE_URI}/list`, withCurrentStorePage(page));
|
||||
}
|
||||
|
||||
async function detail(id: string): Promise<ManagedUser> {
|
||||
@@ -14,11 +15,11 @@ async function detail(id: string): Promise<ManagedUser> {
|
||||
}
|
||||
|
||||
async function create(user: ManagedUser): Promise<ManagedUser> {
|
||||
return await axios.post(`${BASE_URI}/create`, user);
|
||||
return await axios.post(`${BASE_URI}/create`, withCurrentStoreId(user));
|
||||
}
|
||||
|
||||
async function update(user: ManagedUser): Promise<ManagedUser> {
|
||||
return await axios.post(`${BASE_URI}/update`, user);
|
||||
return await axios.post(`${BASE_URI}/update`, withCurrentStoreId(user));
|
||||
}
|
||||
|
||||
async function remove(id: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user