From eae19bb1b047b3568e7a9a624b50e80886e56331 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Mon, 4 Nov 2024 13:47:50 +0300 Subject: feat/frontend: optimizing imports, file extensions (#230) Co-authored-by: FifthWit --- frontend/src/api/Mod.tsx | 58 ------------------------------------------------ 1 file changed, 58 deletions(-) delete mode 100644 frontend/src/api/Mod.tsx (limited to 'frontend/src/api/Mod.tsx') diff --git a/frontend/src/api/Mod.tsx b/frontend/src/api/Mod.tsx deleted file mode 100644 index 9091379..0000000 --- a/frontend/src/api/Mod.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import axios from "axios"; -import { url } from "./Api"; -import { ModMenuContent } from "../types/Content"; - -export const put_map_image = async (token: string, map_id: string, image: string): Promise => { - const response = await axios.put(url(`maps/${map_id}/image`), { - "image": image, - }, { - headers: { - "Authorization": token, - } - }); - return response.data.success; -}; - -export const post_map_summary = async (token: string, map_id: string, content: ModMenuContent): Promise => { - const response = await axios.post(url(`maps/${map_id}/summary`), { - "category_id": content.category_id, - "user_name": content.name, - "score_count": content.score, - "record_date": content.date, - "showcase": content.showcase, - "description": content.description, - }, { - headers: { - "Authorization": token, - } - }); - return response.data.success; -}; - -export const put_map_summary = async (token: string, map_id: string, content: ModMenuContent): Promise => { - const response = await axios.put(url(`maps/${map_id}/summary`), { - "route_id": content.id, - "user_name": content.name, - "score_count": content.score, - "record_date": content.date, - "showcase": content.showcase, - "description": content.description, - }, { - headers: { - "Authorization": token, - } - }); - return response.data.success; -}; - -export const delete_map_summary = async (token: string, map_id: string, route_id: number): Promise => { - const response = await axios.delete(url(`maps/${map_id}/summary`), { - data: { - "route_id": route_id, - }, - headers: { - "Authorization": token, - } - }); - return response.data.success; -}; -- cgit v1.2.3