From 81342e2579165ebfdb28c749dc5225141721a419 Mon Sep 17 00:00:00 2001 From: FifthWit Date: Thu, 30 Jan 2025 13:11:48 -0600 Subject: switched to double quotes --- frontend/src/api/Api.ts | 18 +++++++++--------- frontend/src/api/Auth.ts | 6 +++--- frontend/src/api/Games.ts | 12 ++++++------ frontend/src/api/Maps.ts | 12 ++++++------ frontend/src/api/Mod.ts | 6 +++--- frontend/src/api/Rankings.ts | 6 +++--- frontend/src/api/User.ts | 6 +++--- 7 files changed, 33 insertions(+), 33 deletions(-) (limited to 'frontend/src/api') diff --git a/frontend/src/api/Api.ts b/frontend/src/api/Api.ts index b98dda3..0e1658c 100644 --- a/frontend/src/api/Api.ts +++ b/frontend/src/api/Api.ts @@ -1,14 +1,14 @@ -import { MapDiscussionContent, ModMenuContent } from '@customTypes/Content'; -import { delete_token, get_token } from '@api/Auth'; -import { get_user, get_profile, post_profile } from '@api/User'; +import { MapDiscussionContent, ModMenuContent } from "@customTypes/Content"; +import { delete_token, get_token } from "@api/Auth"; +import { get_user, get_profile, post_profile } from "@api/User"; import { get_games, get_chapters, get_games_chapters, get_game_maps, get_search, -} from '@api/Games'; -import { get_official_rankings, get_unofficial_rankings } from '@api/Rankings'; +} from "@api/Games"; +import { get_official_rankings, get_unofficial_rankings } from "@api/Rankings"; import { get_map_summary, get_map_leaderboard, @@ -19,14 +19,14 @@ import { delete_map_discussion, post_record, delete_map_record, -} from '@api/Maps'; +} from "@api/Maps"; import { delete_map_summary, post_map_summary, put_map_image, put_map_summary, -} from '@api/Mod'; -import { UploadRunContent } from '@customTypes/Content'; +} from "@api/Mod"; +import { UploadRunContent } from "@customTypes/Content"; // add new api call function entries here // example usage: API.get_games(); @@ -91,7 +91,7 @@ export const API = { delete_map_summary(token, map_id, route_id), }; -const BASE_API_URL: string = '/api/v1/'; +const BASE_API_URL: string = "/api/v1/"; export function url(path: string): string { return BASE_API_URL + path; diff --git a/frontend/src/api/Auth.ts b/frontend/src/api/Auth.ts index e495d47..98c6d36 100644 --- a/frontend/src/api/Auth.ts +++ b/frontend/src/api/Auth.ts @@ -1,5 +1,5 @@ -import axios from 'axios'; -import { url } from '@api/Api'; +import axios from "axios"; +import { url } from "@api/Api"; export const get_token = async (): Promise => { const response = await axios.get(url(`token`)); @@ -10,5 +10,5 @@ export const get_token = async (): Promise => { }; export const delete_token = async () => { - await axios.delete(url('token')); + await axios.delete(url("token")); }; diff --git a/frontend/src/api/Games.ts b/frontend/src/api/Games.ts index 0e47091..b739f80 100644 --- a/frontend/src/api/Games.ts +++ b/frontend/src/api/Games.ts @@ -1,9 +1,9 @@ -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`)); diff --git a/frontend/src/api/Maps.ts b/frontend/src/api/Maps.ts index 3a22f88..2485941 100644 --- a/frontend/src/api/Maps.ts +++ b/frontend/src/api/Maps.ts @@ -1,12 +1,12 @@ -import axios from 'axios'; -import { url } from '@api/Api'; -import { MapDiscussionContent, UploadRunContent } from '@customTypes/Content'; +import axios from "axios"; +import { url } from "@api/Api"; +import { MapDiscussionContent, UploadRunContent } from "@customTypes/Content"; import { MapSummary, MapLeaderboard, MapDiscussions, MapDiscussion, -} from '@customTypes/Map'; +} from "@customTypes/Map"; export const get_map_summary = async (map_id: string): Promise => { const response = await axios.get(url(`maps/${map_id}/summary`)); @@ -27,9 +27,9 @@ export const get_map_leaderboard = async ( // map the kind of leaderboard data.records = data.records.map((record: any) => { if (record.host && record.partner) { - return { ...record, kind: 'multiplayer' }; + return { ...record, kind: "multiplayer" }; } else { - return { ...record, kind: 'singleplayer' }; + return { ...record, kind: "singleplayer" }; } }); return data; diff --git a/frontend/src/api/Mod.ts b/frontend/src/api/Mod.ts index 69e76c5..d682f1a 100644 --- a/frontend/src/api/Mod.ts +++ b/frontend/src/api/Mod.ts @@ -1,6 +1,6 @@ -import axios from 'axios'; -import { url } from '@api/Api'; -import { ModMenuContent } from '@customTypes/Content'; +import axios from "axios"; +import { url } from "@api/Api"; +import { ModMenuContent } from "@customTypes/Content"; export const put_map_image = async ( token: string, diff --git a/frontend/src/api/Rankings.ts b/frontend/src/api/Rankings.ts index 9afd999..b8d9bec 100644 --- a/frontend/src/api/Rankings.ts +++ b/frontend/src/api/Rankings.ts @@ -1,6 +1,6 @@ -import axios from 'axios'; -import { url } from '@api/Api'; -import { Ranking, SteamRanking } from '@customTypes/Ranking'; +import axios from "axios"; +import { url } from "@api/Api"; +import { Ranking, SteamRanking } from "@customTypes/Ranking"; export const get_official_rankings = async (): Promise => { const response = await axios.get(url(`rankings/lphub`)); diff --git a/frontend/src/api/User.ts b/frontend/src/api/User.ts index 4ce21e1..004aa22 100644 --- a/frontend/src/api/User.ts +++ b/frontend/src/api/User.ts @@ -1,6 +1,6 @@ -import axios from 'axios'; -import { url } from '@api/Api'; -import { UserProfile } from '@customTypes/Profile'; +import axios from "axios"; +import { url } from "@api/Api"; +import { UserProfile } from "@customTypes/Profile"; export const get_user = async (user_id: string): Promise => { const response = await axios.get(url(`users/${user_id}`)); -- cgit v1.2.3