Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 67f69bb

Browse files
committed
Remove redundant code
1 parent d305db0 commit 67f69bb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

utils/nitro_utils.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,11 @@ inline void nitro_logo() {
246246
}
247247

248248
inline drogon::HttpResponsePtr nitroHttpResponse() {
249-
auto resp = drogon::HttpResponse::newHttpResponse();
249+
auto resp = drogon::HttpResponse::newHttpResponse(drogon::k200OK, drogon::CT_APPLICATION_JSON);
250250
#ifdef ALLOW_ALL_CORS
251251
LOG_INFO << "Respond for all cors!";
252252
resp->addHeader("Access-Control-Allow-Origin", "*");
253253
#endif
254-
resp->setContentTypeString("application/json");
255254
return resp;
256255
}
257256

@@ -274,7 +273,6 @@ inline drogon::HttpResponsePtr nitroStreamResponse(
274273
LOG_INFO << "Respond for all cors!";
275274
resp->addHeader("Access-Control-Allow-Origin", "*");
276275
#endif
277-
resp->setContentTypeString("application/json");
278276
return resp;
279277
}
280278

0 commit comments

Comments
 (0)