feat: Add delete-alias.ts API

This commit is contained in:
Myzel394 2023-02-14 19:57:21 +01:00
parent 785a712eb7
commit d786199111
2 changed files with 12 additions and 0 deletions

10
src/apis/delete-alias.ts Normal file
View File

@ -0,0 +1,10 @@
import {client} from "~/constants/axios-client"
import {SimpleDetailResponse} from "~/server-types"
export default async function deleteAlias(id: string): Promise<SimpleDetailResponse> {
const {data} = await client.delete(`${import.meta.env.VITE_SERVER_BASE_URL}/v1/report/${id}`, {
withCredentials: true,
})
return data
}

View File

@ -52,3 +52,5 @@ export * from "./get-admin-settings"
export {default as getAdminSettings} from "./get-admin-settings" export {default as getAdminSettings} from "./get-admin-settings"
export * from "./update-admin-settings" export * from "./update-admin-settings"
export {default as updateAdminSettings} from "./update-admin-settings" export {default as updateAdminSettings} from "./update-admin-settings"
export * from "./delete-alias"
export {default as deleteAlias} from "./delete-alias"