|
|
|
@ -197,10 +197,10 @@ def getMap(containerID):
|
|
|
|
|
|
|
|
|
|
@app.route('/parts/getfile/<filename>')
|
|
|
|
|
def getfile(filename):
|
|
|
|
|
if(re.match('^[\w\-_]+$', filename) == None):
|
|
|
|
|
if(re.match('^[\w\-_]+.[p|P][d|D][f|F]$', filename) == None):
|
|
|
|
|
return 'No injections pls.'
|
|
|
|
|
|
|
|
|
|
return send_from_directory('/srv/datasheets/', filename + '.pdf')
|
|
|
|
|
return send_from_directory('/srv/datasheets/', filename)
|
|
|
|
|
|
|
|
|
|
@app.route('/parts/alter/<partID>', methods=['POST'])
|
|
|
|
|
@requires_auth
|
|
|
|
|