Commit 23e24e19 authored by Marco Mariani's avatar Marco Mariani

proxy: support for 'slapos remove' command

parent 4117ca79
...@@ -258,7 +258,10 @@ def supplySupply(): ...@@ -258,7 +258,10 @@ def supplySupply():
url = request.form['url'] url = request.form['url']
computer_id = request.form['computer_id'] computer_id = request.form['computer_id']
if app.config['computer_id'] == computer_id: if app.config['computer_id'] == computer_id:
execute_db('software', 'INSERT OR REPLACE INTO %s VALUES(?)', [url]) if request.form['state'] == 'destroyed':
execute_db('software', 'DELETE FROM %s WHERE url = ?', [url])
else:
execute_db('software', 'INSERT OR REPLACE INTO %s VALUES(?)', [url])
else: else:
raise UnauthorizedError, "Only accept request for: %s" % \ raise UnauthorizedError, "Only accept request for: %s" % \
app.config['computer_id'] app.config['computer_id']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment