mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
code: cpp,dbal,client (2 files)
This commit is contained in:
@@ -36,6 +36,12 @@ public:
|
||||
Result<int> batchUpdateUsers(const std::vector<UpdateUserBatchItem>& updates);
|
||||
Result<int> batchDeleteUsers(const std::vector<std::string>& ids);
|
||||
|
||||
Result<bool> setCredential(const CreateCredentialInput& input);
|
||||
Result<bool> verifyCredential(const std::string& username, const std::string& password);
|
||||
Result<bool> setCredentialFirstLoginFlag(const std::string& username, bool first_login);
|
||||
Result<bool> getCredentialFirstLoginFlag(const std::string& username);
|
||||
Result<bool> deleteCredential(const std::string& username);
|
||||
|
||||
Result<PageView> createPage(const CreatePageInput& input);
|
||||
Result<PageView> getPage(const std::string& id);
|
||||
Result<PageView> getPageBySlug(const std::string& slug);
|
||||
|
||||
@@ -50,6 +50,26 @@ Result<int> Client::batchDeleteUsers(const std::vector<std::string>& ids) {
|
||||
return entities::user::batchDelete(getStore(), ids);
|
||||
}
|
||||
|
||||
Result<bool> Client::setCredential(const CreateCredentialInput& input) {
|
||||
return entities::credential::set(getStore(), input);
|
||||
}
|
||||
|
||||
Result<bool> Client::verifyCredential(const std::string& username, const std::string& password) {
|
||||
return entities::credential::verify(getStore(), username, password);
|
||||
}
|
||||
|
||||
Result<bool> Client::setCredentialFirstLoginFlag(const std::string& username, bool flag) {
|
||||
return entities::credential::setFirstLogin(getStore(), username, flag);
|
||||
}
|
||||
|
||||
Result<bool> Client::getCredentialFirstLoginFlag(const std::string& username) {
|
||||
return entities::credential::getFirstLogin(getStore(), username);
|
||||
}
|
||||
|
||||
Result<bool> Client::deleteCredential(const std::string& username) {
|
||||
return entities::credential::remove(getStore(), username);
|
||||
}
|
||||
|
||||
Result<PageView> Client::createPage(const CreatePageInput& input) {
|
||||
return entities::page::create(getStore(), input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user