Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
fix api location
Browse files Browse the repository at this point in the history
  • Loading branch information
golonzovsky committed May 10, 2021
1 parent 2972643 commit c72fe95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function App() {
useEffect(() => {
async function fetchData() {
const result = await axios(
'/api',
'/api/',
);
setData(result.data);
}
Expand All @@ -34,8 +34,7 @@ function App() {
<Col lg={{span: 6, offset: 0}} style={{minHeight: "100vh", padding: '30px'}}>
<Title level={3} style={{paddingTop: '50px'}}>Available slots for group N:</Title>
<LocationList locations={data.locations}/>
<Text type="secondary" style={{paddingTop: '15px', display: 'block'}}>Last
refresh {moment(data.last_refresh).fromNow()}</Text>
<Text type="secondary" style={{paddingTop: '15px', display: 'block'}}>Last refresh: {moment(data.last_refresh).fromNow()}</Text>
</Col>
<Col lg={{span: 18, offset: 0}} style={{minHeight: "100vh"}}>
<Map/>
Expand All @@ -47,6 +46,7 @@ function App() {
}

function Map() {
//todo fill with data
const [viewport, setViewport] = React.useState({
latitude: 47.377909732589615,
longitude: 8.540479916024365,
Expand Down
8 changes: 4 additions & 4 deletions parser/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ def update_caches():
logging.info(cache)


@app.route("/locations")
def locations_path():
@app.route("/api/locations")
def api_locations():
return jsonify(all_locations)


@app.route("/")
def home():
@app.route("/api/")
def api_home():
return jsonify(cache)


Expand Down

0 comments on commit c72fe95

Please sign in to comment.