diff options
author | Michael McVady <femtonaut@gmail.com> | 2023-01-05 13:35:55 -0600 |
---|---|---|
committer | Michael McVady <femtonaut@gmail.com> | 2023-01-05 13:35:55 -0600 |
commit | 87e67055ae0a8cf150928d63dc3abe32b69c2d82 (patch) | |
tree | a6e861bf3b3004f89596aee89eb3b3f38e1a3c98 /src | |
parent | c3dd646429103ab5a5e77da524715ad3ace4c987 (diff) |
Don't return 404 on requests with empty DB
Diffstat (limited to 'src')
-rw-r--r-- | src/clog.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -269,9 +269,8 @@ render_posts_query(struct post_request *post_req) { ); } else { // post_req->type == HTML rows = kore_pgsql_ntuples(&sql); - // FIXME: add test for this: - // if (post_req->resource && rows == 0) { - if (rows == 0) { + // TODO: Add test for this; When database is empty, don't return 404 for base request. + if (post_req->resource && rows == 0) { post_req->resp_status = HTTP_STATUS_NOT_FOUND; goto out; } |