Skip to content

Commit

Permalink
feat: show total amount of cards in returned json
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed Jul 26, 2023
1 parent 0d60973 commit d5e9054
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web-api/async_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ static int __mse_jsonify_search_res_impl(mse_search_result_t *res,
ASSERT(tmp = json_integer(query->page_number));
ASSERT(json_object_set(json, "page", tmp) == 0);

ASSERT(tmp = json_integer(res->cards_length));
ASSERT(json_object_set(json, "cards_total", tmp) == 0);

ASSERT(query->resp = json_dumps(json, 0));
return 1;
}
Expand Down

0 comments on commit d5e9054

Please sign in to comment.