This commit is contained in:
@@ -285,7 +285,7 @@ def list_all_tasks(id):
|
||||
tasks.append(task_dict)
|
||||
tasks.sort(key=lambda t: (not t['assigned'], t['name'].lower()))
|
||||
|
||||
return jsonify({ 'tasks': tasks }), 200
|
||||
return jsonify({ 'tasks': tasks, 'count': len(tasks), 'list_type': 'task' }), 200
|
||||
|
||||
|
||||
@child_api.route('/child/<id>/trigger-task', methods=['POST'])
|
||||
@@ -373,7 +373,8 @@ def list_all_rewards(id):
|
||||
|
||||
return jsonify({
|
||||
'rewards': rewards,
|
||||
'rewards_count': len(rewards)
|
||||
'rewards_count': len(rewards),
|
||||
'list_type': 'reward'
|
||||
}), 200
|
||||
|
||||
|
||||
@@ -680,5 +681,5 @@ def list_pending_rewards():
|
||||
)
|
||||
reward_responses.append(response.to_dict())
|
||||
|
||||
return jsonify({'rewards': reward_responses}), 200
|
||||
return jsonify({'rewards': reward_responses, 'count': len(reward_responses), 'list_type': 'notification'}), 200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user