Skip to main content

create

Function create 

Source
pub fn create(
    database_url: &str,
    dialect: Dialect,
    email: &str,
    name: &str,
    password_hash: &str,
) -> Result<()>
Expand description

Insert an admin user (is_admin = true) into the users table. password_hash must already be an Argon2 PHC string (see gize-auth). Rejects a duplicate email up front and reports a missing users table with guidance to migrate first.