market implement
This commit is contained in:
@@ -93,13 +93,15 @@ def get_pending_command():
|
||||
|
||||
build_cmd = _fetch_pending_of_type(c, 'build')
|
||||
recruit_cmd = _fetch_pending_of_type(c, 'recruit')
|
||||
market_cmd = _fetch_pending_of_type(c, 'market_offer')
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
return jsonify({
|
||||
'build': build_cmd,
|
||||
'recruit': recruit_cmd
|
||||
'recruit': recruit_cmd,
|
||||
'market': market_cmd
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -144,8 +144,8 @@ def create_command():
|
||||
return jsonify({'error': f'missing field: {field}'}), 400
|
||||
|
||||
cmd_type = data['type']
|
||||
if cmd_type not in ('build', 'recruit'):
|
||||
return jsonify({'error': 'type must be build or recruit'}), 400
|
||||
if cmd_type not in ('build', 'recruit', 'market_offer'):
|
||||
return jsonify({'error': 'type must be build, recruit, or market_offer'}), 400
|
||||
|
||||
# Reject if the Tampermonkey client is offline (no state push in last 150 s)
|
||||
conn = get_db()
|
||||
|
||||
Reference in New Issue
Block a user