Fixed another merge.
This commit is contained in:
commit
3ce2d99c22
|
@ -41,7 +41,6 @@
|
|||
<version>1.9.0</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -45,25 +45,30 @@ export function getFileUrl(fileId: number) {
|
|||
return BASE_URL + `/files/${fileId}`;
|
||||
}
|
||||
|
||||
export async function getGym(countryCode: string, cityShortName: string, gymShortName: string): Promise<Gym> {
|
||||
const response = await api.get(`/gyms/${countryCode}/${cityShortName}/${gymShortName}`);
|
||||
const d = response.data;
|
||||
const gym: Gym = {
|
||||
countryCode: d.countryCode,
|
||||
countryName: d.countryName,
|
||||
cityShortName: d.cityShortName,
|
||||
cityName: d.cityName,
|
||||
createdAt: new Date(d.createdAt),
|
||||
shortName: d.shortName,
|
||||
displayName: d.displayName,
|
||||
websiteUrl: d.websiteUrl,
|
||||
location: d.location,
|
||||
streetAddress: d.streetAddress
|
||||
};
|
||||
return gym;
|
||||
}
|
||||
|
||||
export async function getExercises(): Promise<Array<Exercise>> {
|
||||
const response = await api.get(`/exercises`);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function getGym(
|
||||
countryCode: string,
|
||||
cityShortName: string,
|
||||
gymShortName: string
|
||||
): Promise<Gym> {
|
||||
const response = await api.get(
|
||||
`/gyms/${countryCode}/${cityShortName}/${gymShortName}`
|
||||
);
|
||||
const d = response.data;
|
||||
return {
|
||||
countryCode: d.countryCode,
|
||||
countryName: d.countryName,
|
||||
cityShortName: d.cityShortName,
|
||||
cityName: d.cityName,
|
||||
createdAt: new Date(d.createdAt),
|
||||
shortName: d.shortName,
|
||||
displayName: d.displayName,
|
||||
websiteUrl: d.websiteUrl,
|
||||
location: d.location,
|
||||
streetAddress: d.streetAddress,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue