Added comments to the funtions

This commit is contained in:
2023-05-09 20:27:58 +03:00
parent 207832be43
commit 3db99a3626
30 changed files with 75 additions and 8 deletions

View File

@ -88,6 +88,7 @@ impl Model {
}
impl Entity {
/// Gets all user's account from DB
pub async fn get_all(
user_id: u64,
db: &DatabaseConnection,
@ -116,6 +117,7 @@ impl Entity {
Ok(result.err_into())
}
/// Checks if the account exists
pub async fn exists(
user_id: u64,
account_name: impl Into<String>,
@ -130,6 +132,7 @@ impl Entity {
Ok(result.is_some())
}
/// Gets the account from the DB
pub async fn get(
user_id: u64,
account_name: impl Into<String>,

View File

@ -42,6 +42,7 @@ impl ActiveModel {
}
impl Entity {
/// Verifies the provided master password against the one from DB
pub async fn verify_master_pass(
user_id: u64,
master_pass: String,