feat(api): add auth HTTP controller with tests

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

查看文件

@@ -10,7 +10,11 @@ AppState& AppState::Instance() {
}
void AppState::Init(const std::string& sqlite_path) {
db_ = std::make_unique<db::SqliteDb>(db::SqliteDb::OpenFile(sqlite_path));
if (sqlite_path == ":memory:") {
db_ = std::make_unique<db::SqliteDb>(db::SqliteDb::OpenMemory());
} else {
db_ = std::make_unique<db::SqliteDb>(db::SqliteDb::OpenFile(sqlite_path));
}
csp::db::ApplyMigrations(*db_);
}