From 920dc0cd6c5b573a7fbf4b597566fee7372adefb Mon Sep 17 00:00:00 2001 From: JohnDoe6345789 Date: Fri, 26 Dec 2025 06:04:38 +0000 Subject: [PATCH] code: cpp,dbal,client (2 files) --- dbal/cpp/include/dbal/core/client.hpp | 6 ++++++ dbal/cpp/src/client.cpp | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/dbal/cpp/include/dbal/core/client.hpp b/dbal/cpp/include/dbal/core/client.hpp index 4e968ec23..26e833cf3 100644 --- a/dbal/cpp/include/dbal/core/client.hpp +++ b/dbal/cpp/include/dbal/core/client.hpp @@ -36,6 +36,12 @@ public: Result batchUpdateUsers(const std::vector& updates); Result batchDeleteUsers(const std::vector& ids); + Result setCredential(const CreateCredentialInput& input); + Result verifyCredential(const std::string& username, const std::string& password); + Result setCredentialFirstLoginFlag(const std::string& username, bool first_login); + Result getCredentialFirstLoginFlag(const std::string& username); + Result deleteCredential(const std::string& username); + Result createPage(const CreatePageInput& input); Result getPage(const std::string& id); Result getPageBySlug(const std::string& slug); diff --git a/dbal/cpp/src/client.cpp b/dbal/cpp/src/client.cpp index 676bf34f1..e7a2d9cb6 100644 --- a/dbal/cpp/src/client.cpp +++ b/dbal/cpp/src/client.cpp @@ -50,6 +50,26 @@ Result Client::batchDeleteUsers(const std::vector& ids) { return entities::user::batchDelete(getStore(), ids); } +Result Client::setCredential(const CreateCredentialInput& input) { + return entities::credential::set(getStore(), input); +} + +Result Client::verifyCredential(const std::string& username, const std::string& password) { + return entities::credential::verify(getStore(), username, password); +} + +Result Client::setCredentialFirstLoginFlag(const std::string& username, bool flag) { + return entities::credential::setFirstLogin(getStore(), username, flag); +} + +Result Client::getCredentialFirstLoginFlag(const std::string& username) { + return entities::credential::getFirstLogin(getStore(), username); +} + +Result Client::deleteCredential(const std::string& username) { + return entities::credential::remove(getStore(), username); +} + Result Client::createPage(const CreatePageInput& input) { return entities::page::create(getStore(), input); }