Initial public release

This commit is contained in:
thakares committed 2026-06-11 20:19:03 +05:30
commit c1107147b4
92 files changed
+10562

No files matched your search

+14
View File
@@ -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)
}