diff options
Diffstat (limited to 'frontend/src/api/Maps.ts')
| -rw-r--r-- | frontend/src/api/Maps.ts | 12 |
1 files changed, 6 insertions, 6 deletions
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 @@ | |||
| 1 | import axios from 'axios'; | 1 | import axios from "axios"; |
| 2 | import { url } from '@api/Api'; | 2 | import { url } from "@api/Api"; |
| 3 | import { MapDiscussionContent, UploadRunContent } from '@customTypes/Content'; | 3 | import { MapDiscussionContent, UploadRunContent } from "@customTypes/Content"; |
| 4 | import { | 4 | import { |
| 5 | MapSummary, | 5 | MapSummary, |
| 6 | MapLeaderboard, | 6 | MapLeaderboard, |
| 7 | MapDiscussions, | 7 | MapDiscussions, |
| 8 | MapDiscussion, | 8 | MapDiscussion, |
| 9 | } from '@customTypes/Map'; | 9 | } from "@customTypes/Map"; |
| 10 | 10 | ||
| 11 | export const get_map_summary = async (map_id: string): Promise<MapSummary> => { | 11 | export const get_map_summary = async (map_id: string): Promise<MapSummary> => { |
| 12 | const response = await axios.get(url(`maps/${map_id}/summary`)); | 12 | const response = await axios.get(url(`maps/${map_id}/summary`)); |
| @@ -27,9 +27,9 @@ export const get_map_leaderboard = async ( | |||
| 27 | // map the kind of leaderboard | 27 | // map the kind of leaderboard |
| 28 | data.records = data.records.map((record: any) => { | 28 | data.records = data.records.map((record: any) => { |
| 29 | if (record.host && record.partner) { | 29 | if (record.host && record.partner) { |
| 30 | return { ...record, kind: 'multiplayer' }; | 30 | return { ...record, kind: "multiplayer" }; |
| 31 | } else { | 31 | } else { |
| 32 | return { ...record, kind: 'singleplayer' }; | 32 | return { ...record, kind: "singleplayer" }; |
| 33 | } | 33 | } |
| 34 | }); | 34 | }); |
| 35 | return data; | 35 | return data; |