Merge branch 'master' of git.elab.kth.se:davide/ELAB-partsearch

pull/3/head
Davide Bongiovanni 6 years ago
commit d2e6e2de7c

@ -57,6 +57,16 @@ def get_locations():
r.close()
return json.dumps(l)
@app.route('/parts/getlocationURL/<locationID>')
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/<partID>')
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;'

Loading…
Cancel
Save