refactor(frontend): ♻️ update API folder structure

This commit is contained in:
Hayden 2021-10-23 16:42:20 -08:00
parent 9b79b82c4d
commit a94b9d504f
25 changed files with 83 additions and 36 deletions

View file

@ -0,0 +1,18 @@
import { BaseAPI } from "../_base";
import { ServerTask } from "~/api/types/server-task";
const prefix = "/api";
const routes = {
base: `${prefix}/admin/server-tasks`,
};
export class AdminTaskAPI extends BaseAPI {
async testTask() {
return await this.requests.post<ServerTask>(`${routes.base}`, {});
}
async getAll() {
return await this.requests.get<ServerTask[]>(routes.base);
}
}