From e40f07211f5f15dcb138e2520a76d13afd3c0cfd Mon Sep 17 00:00:00 2001 From: FifthWit Date: Thu, 30 Jan 2025 10:44:30 -0600 Subject: formatted with prettier --- frontend/src/api/Games.ts | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'frontend/src/api/Games.ts') diff --git a/frontend/src/api/Games.ts b/frontend/src/api/Games.ts index 72bb4b3..0e47091 100644 --- a/frontend/src/api/Games.ts +++ b/frontend/src/api/Games.ts @@ -1,31 +1,35 @@ -import axios from "axios"; -import { url } from "@api/Api"; -import { GameChapter, GamesChapters } from "@customTypes/Chapters"; -import { Game } from "@customTypes/Game"; -import { Map } from "@customTypes/Map"; -import { Search } from "@customTypes/Search"; +import axios from 'axios'; +import { url } from '@api/Api'; +import { GameChapter, GamesChapters } from '@customTypes/Chapters'; +import { Game } from '@customTypes/Game'; +import { Map } from '@customTypes/Map'; +import { Search } from '@customTypes/Search'; export const get_games = async (): Promise => { - const response = await axios.get(url(`games`)) + const response = await axios.get(url(`games`)); return response.data.data; }; -export const get_chapters = async (chapter_id: string): Promise => { +export const get_chapters = async ( + chapter_id: string +): Promise => { const response = await axios.get(url(`chapters/${chapter_id}`)); return response.data.data; -} +}; -export const get_games_chapters = async (game_id: string): Promise => { +export const get_games_chapters = async ( + game_id: string +): Promise => { const response = await axios.get(url(`games/${game_id}`)); return response.data.data; }; export const get_game_maps = async (game_id: string): Promise => { - const response = await axios.get(url(`games/${game_id}/maps`)) + const response = await axios.get(url(`games/${game_id}/maps`)); return response.data.data.maps; }; export const get_search = async (q: string): Promise => { - const response = await axios.get(url(`search?q=${q}`)) + const response = await axios.get(url(`search?q=${q}`)); return response.data.data; }; -- cgit v1.2.3