Skip to content

Commit

Permalink
Merge branch 'master' of github.com:an-tao/drogon-website
Browse files Browse the repository at this point in the history
  • Loading branch information
marty1885 committed Jun 14, 2021
2 parents dfd9a42 + 90da2e1 commit 51d2025
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/templates/IndexPage.csp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ app().registerHandler("/", [](const HttpRequestPtr& req, Callback &&callback)
<pre><code class="c++">app().registerHandler("/get_num_users", [](const HttpRequestPtr& req) -&gt; Task&lt;HttpResponsePtr&gt;
{
auto client = app().getDbClient();
auto result = co_await sql->execSqlCoro("SELECT COUNT(*) FROM users;");
auto result = co_await client->execSqlCoro("SELECT COUNT(*) FROM users;");

auto resp = HttpResponse::newHttpResponse();
resp->setBody(std::to_string(result[0][0].as&lt;size_t&gt;()));
Expand Down

0 comments on commit 51d2025

Please sign in to comment.