use std::sync::Arc; use axum::{Extension, response::Response}; use crate::database::Database; pub async fn get( Extension(db): Extension> ) -> Response{ let user_count = db.count_users().await.unwrap(); let signin_method = if user_count == 0{ "first-time-setup" } else{ "login" }; Response::builder() .header("Access-Control-Allow-Origin", "http://127.0.0.1:5173") .header("Access-Control-Allow-Method", "GET") .body(signin_method.into()) .unwrap() }