mirror of
https://github.com/Buriburizaem0n/admin-frontend-domain.git
synced 2026-09-19 17:50:13 +00:00
implement cron page (#7)
This commit is contained in:
+4
-4
@@ -2,17 +2,17 @@ import { ModelDDNSForm } from "@/types"
|
||||
import { fetcher, FetcherMethod } from "./api"
|
||||
|
||||
export const createDDNSProfile = async (data: ModelDDNSForm): Promise<number> => {
|
||||
return fetcher<number>(FetcherMethod.POST, '/api/v1/ddns', data)
|
||||
return fetcher<number>(FetcherMethod.POST, '/api/v1/ddns', data);
|
||||
}
|
||||
|
||||
export const updateDDNSProfile = async (id: number, data: ModelDDNSForm): Promise<void> => {
|
||||
return fetcher<void>(FetcherMethod.PATCH, `/api/v1/ddns/${id}`, data)
|
||||
return fetcher<void>(FetcherMethod.PATCH, `/api/v1/ddns/${id}`, data);
|
||||
}
|
||||
|
||||
export const deleteDDNSProfiles = async (id: number[]): Promise<void> => {
|
||||
return fetcher<void>(FetcherMethod.POST, '/api/v1/batch-delete/ddns', id)
|
||||
return fetcher<void>(FetcherMethod.POST, '/api/v1/batch-delete/ddns', id);
|
||||
}
|
||||
|
||||
export const getDDNSProviders = async (): Promise<string[]> => {
|
||||
return fetcher<string[]>(FetcherMethod.GET, '/api/v1/ddns/providers', null)
|
||||
return fetcher<string[]>(FetcherMethod.GET, '/api/v1/ddns/providers', null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user