Merge branch 'master' of git.elab.kth.se:davide/ELAB-partsearch
This commit is contained in:
@@ -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;'
|
||||
|
||||
Reference in New Issue
Block a user