aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/api')
-rw-r--r--frontend/src/api/Api.ts (renamed from frontend/src/api/Api.tsx)16
-rw-r--r--frontend/src/api/Auth.ts (renamed from frontend/src/api/Auth.tsx)2
-rw-r--r--frontend/src/api/Games.ts (renamed from frontend/src/api/Games.tsx)10
-rw-r--r--frontend/src/api/Maps.ts (renamed from frontend/src/api/Maps.tsx)6
-rw-r--r--frontend/src/api/Mod.ts (renamed from frontend/src/api/Mod.tsx)4
-rw-r--r--frontend/src/api/Rankings.ts (renamed from frontend/src/api/Rankings.tsx)4
-rw-r--r--frontend/src/api/User.ts (renamed from frontend/src/api/User.tsx)4
7 files changed, 23 insertions, 23 deletions
diff --git a/frontend/src/api/Api.tsx b/frontend/src/api/Api.ts
index 053e920..2e55ab4 100644
--- a/frontend/src/api/Api.tsx
+++ b/frontend/src/api/Api.ts
@@ -1,11 +1,11 @@
1import { MapDiscussionCommentContent, MapDiscussionContent, ModMenuContent } from '../types/Content'; 1import { MapDiscussionCommentContent, MapDiscussionContent, ModMenuContent } from '@customTypes/Content';
2import { delete_token, get_token } from './Auth'; 2import { delete_token, get_token } from '@api/Auth';
3import { get_user, get_profile, post_profile } from './User'; 3import { get_user, get_profile, post_profile } from '@api/User';
4import { get_games, get_chapters, get_games_chapters, get_game_maps, get_search } from './Games'; 4import { get_games, get_chapters, get_games_chapters, get_game_maps, get_search } from '@api/Games';
5import { get_official_rankings, get_unofficial_rankings } from './Rankings'; 5import { get_official_rankings, get_unofficial_rankings } from '@api/Rankings';
6import { get_map_summary, get_map_leaderboard, get_map_discussions, get_map_discussion, post_map_discussion, post_map_discussion_comment, delete_map_discussion, post_record, delete_map_record } from './Maps'; 6import { get_map_summary, get_map_leaderboard, get_map_discussions, get_map_discussion, post_map_discussion, post_map_discussion_comment, delete_map_discussion, post_record, delete_map_record } from '@api/Maps';
7import { delete_map_summary, post_map_summary, put_map_image, put_map_summary } from './Mod'; 7import { delete_map_summary, post_map_summary, put_map_image, put_map_summary } from '@api/Mod';
8import { UploadRunContent } from '../types/Content'; 8import { UploadRunContent } from '@customTypes/Content';
9 9
10// add new api call function entries here 10// add new api call function entries here
11// example usage: API.get_games(); 11// example usage: API.get_games();
diff --git a/frontend/src/api/Auth.tsx b/frontend/src/api/Auth.ts
index 09269e6..875c7e5 100644
--- a/frontend/src/api/Auth.tsx
+++ b/frontend/src/api/Auth.ts
@@ -1,5 +1,5 @@
1import axios from "axios"; 1import axios from "axios";
2import { url } from "./Api"; 2import { url } from "@api/Api";
3 3
4export const get_token = async (): Promise<string | undefined> => { 4export const get_token = async (): Promise<string | undefined> => {
5 const response = await axios.get(url(`token`)) 5 const response = await axios.get(url(`token`))
diff --git a/frontend/src/api/Games.tsx b/frontend/src/api/Games.ts
index 84b5f74..72bb4b3 100644
--- a/frontend/src/api/Games.tsx
+++ b/frontend/src/api/Games.ts
@@ -1,9 +1,9 @@
1import axios from "axios"; 1import axios from "axios";
2import { url } from "./Api"; 2import { url } from "@api/Api";
3import { GameChapter, GamesChapters } from "../types/Chapters"; 3import { GameChapter, GamesChapters } from "@customTypes/Chapters";
4import { Game } from "../types/Game"; 4import { Game } from "@customTypes/Game";
5import { Map } from "../types/Map"; 5import { Map } from "@customTypes/Map";
6import { Search } from "../types/Search"; 6import { Search } from "@customTypes/Search";
7 7
8export const get_games = async (): Promise<Game[]> => { 8export const get_games = async (): Promise<Game[]> => {
9 const response = await axios.get(url(`games`)) 9 const response = await axios.get(url(`games`))
diff --git a/frontend/src/api/Maps.tsx b/frontend/src/api/Maps.ts
index fc50293..89657b5 100644
--- a/frontend/src/api/Maps.tsx
+++ b/frontend/src/api/Maps.ts
@@ -1,7 +1,7 @@
1import axios from "axios"; 1import axios from "axios";
2import { url } from "./Api"; 2import { url } from "@api/Api";
3import { MapDiscussionContent, UploadRunContent } from "../types/Content"; 3import { MapDiscussionContent, UploadRunContent } from "@customTypes/Content";
4import { MapSummary, MapLeaderboard, MapDiscussions, MapDiscussion } from "../types/Map"; 4import { MapSummary, MapLeaderboard, MapDiscussions, MapDiscussion } from "@customTypes/Map";
5 5
6export const get_map_summary = async (map_id: string): Promise<MapSummary> => { 6export const get_map_summary = async (map_id: string): Promise<MapSummary> => {
7 const response = await axios.get(url(`maps/${map_id}/summary`)) 7 const response = await axios.get(url(`maps/${map_id}/summary`))
diff --git a/frontend/src/api/Mod.tsx b/frontend/src/api/Mod.ts
index 9091379..1511f8b 100644
--- a/frontend/src/api/Mod.tsx
+++ b/frontend/src/api/Mod.ts
@@ -1,6 +1,6 @@
1import axios from "axios"; 1import axios from "axios";
2import { url } from "./Api"; 2import { url } from "@api/Api";
3import { ModMenuContent } from "../types/Content"; 3import { ModMenuContent } from "@customTypes/Content";
4 4
5export const put_map_image = async (token: string, map_id: string, image: string): Promise<boolean> => { 5export const put_map_image = async (token: string, map_id: string, image: string): Promise<boolean> => {
6 const response = await axios.put(url(`maps/${map_id}/image`), { 6 const response = await axios.put(url(`maps/${map_id}/image`), {
diff --git a/frontend/src/api/Rankings.tsx b/frontend/src/api/Rankings.ts
index 384f826..b8d9bec 100644
--- a/frontend/src/api/Rankings.tsx
+++ b/frontend/src/api/Rankings.ts
@@ -1,6 +1,6 @@
1import axios from "axios"; 1import axios from "axios";
2import { url } from "./Api"; 2import { url } from "@api/Api";
3import { Ranking, SteamRanking } from "../types/Ranking"; 3import { Ranking, SteamRanking } from "@customTypes/Ranking";
4 4
5export const get_official_rankings = async (): Promise<Ranking> => { 5export const get_official_rankings = async (): Promise<Ranking> => {
6 const response = await axios.get(url(`rankings/lphub`)); 6 const response = await axios.get(url(`rankings/lphub`));
diff --git a/frontend/src/api/User.tsx b/frontend/src/api/User.ts
index c4d1944..88da0f2 100644
--- a/frontend/src/api/User.tsx
+++ b/frontend/src/api/User.ts
@@ -1,6 +1,6 @@
1import axios from "axios"; 1import axios from "axios";
2import { url } from "./Api"; 2import { url } from "@api/Api";
3import { UserProfile } from "../types/Profile"; 3import { UserProfile } from "@customTypes/Profile";
4 4
5export const get_user = async (user_id: string): Promise<UserProfile> => { 5export const get_user = async (user_id: string): Promise<UserProfile> => {
6 const response = await axios.get(url(`users/${user_id}`)); 6 const response = await axios.get(url(`users/${user_id}`));