Initial public release
This commit is contained in:
commit
c1107147b4
92 files changed
+10562
No files matched your search
@@ -0,0 +1,14 @@
|
||||
use crate::db::Db;
|
||||
use crate::models::ApiKey;
|
||||
use crate::error::AppError;
|
||||
|
||||
pub fn create_api_key(
|
||||
db: &Db,
|
||||
user_id: &str,
|
||||
name: &str,
|
||||
key_hash: &str,
|
||||
) -> Result<ApiKey, AppError> {
|
||||
let conn = db.admin.lock().unwrap();
|
||||
let key = crate::db::admin::create_api_key(&conn, user_id, name, key_hash)?;
|
||||
Ok(key)
|
||||
}
|
||||
Reference in new issue
Block a user