refactoring
All checks were successful
Gitea Actions Demo / build-and-push (push) Successful in 12s

This commit is contained in:
2026-01-15 16:42:01 -05:00
parent dcac2742e9
commit 904185e5c8
9 changed files with 276 additions and 238 deletions

View File

@@ -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