diff --git a/parts/server.py b/parts/server.py index 1eb2570..cdbcaec 100644 --- a/parts/server.py +++ b/parts/server.py @@ -57,6 +57,16 @@ def get_locations(): r.close() return json.dumps(l) +@app.route('/parts/getlocationURL/') +def get_locationURL(locationID): + s = 'select map from locations where id = :id;' + r = db_engine.execute(text(s), id=locationID) + l=[]; + for row in r: + l.append(row); + r.close() + return l[0][0] + @app.route('/parts/getpartinfo/') def get_part_info(partID): s = 'select * from parts as p inner join locations as l on p.location_id=l.id where p.id = :id;'