feat(api): add auth HTTP controller with tests

这个提交包含在:
anygen-build-bot
2026-02-12 09:11:39 +00:00
父节点 a6d087d5a9
当前提交 677efd4b97
修改 7 个文件,包含 178 行新增3 行删除

查看文件

@@ -25,9 +25,22 @@ target_link_libraries(csp_core PUBLIC
OpenSSL::Crypto
)
add_library(csp_web
src/controllers/auth_controller.cc
src/health_controller.cc
)
target_include_directories(csp_web PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(csp_web PRIVATE
Drogon::Drogon
csp_core
)
add_executable(csp_server
src/main.cc
src/health_controller.cc
)
target_include_directories(csp_server PRIVATE
@@ -37,6 +50,7 @@ target_include_directories(csp_server PRIVATE
target_link_libraries(csp_server PRIVATE
Drogon::Drogon
csp_core
csp_web
)
enable_testing()
@@ -45,11 +59,18 @@ add_executable(csp_tests
tests/version_test.cc
tests/sqlite_db_test.cc
tests/auth_service_test.cc
tests/auth_http_test.cc
)
target_include_directories(csp_tests PRIVATE
/usr/include/jsoncpp
)
target_link_libraries(csp_tests PRIVATE
Catch2::Catch2WithMain
Drogon::Drogon
csp_core
csp_web
)
include(CTest)