refactor event

This commit is contained in:
Timi
2026-08-06 20:53:22 +08:00
parent 1243068fc3
commit 9df6dfaf59
37 changed files with 1584 additions and 2316 deletions
+6 -7
View File
@@ -7,7 +7,7 @@ async function list(req: Page<EventItem>): Promise<PageResult<EventItem>> {
return await axios.post(`${BASE_URI}/list`, req);
}
async function enabledList(): Promise<EventItem[]> {
async function listValid(): Promise<EventItem[]> {
return await axios.post(`${BASE_URI}/list/valid`);
}
@@ -17,12 +17,12 @@ async function detail(id: string): Promise<EventItem> {
});
}
async function create(req: EventItem): Promise<void> {
return await axios.post(`${BASE_URI}/create`, req);
async function create(event: EventItem): Promise<void> {
return await axios.post(`${BASE_URI}/create`, event);
}
async function update(req: EventItem): Promise<void> {
return await axios.post(`${BASE_URI}/update`, req);
async function update(event: EventItem): Promise<void> {
return await axios.post(`${BASE_URI}/update`, event);
}
async function sort(idList: string[]): Promise<void> {
@@ -37,11 +37,10 @@ async function remove(id: string): Promise<void> {
export default {
list,
enabledList,
listValid,
detail,
create,
update,
sort,
remove
};