Add creation of the initial user to the main func

This commit is contained in:
2021-02-10 09:09:17 +01:00
parent d3465b4e10
commit 8cb121b568
4 changed files with 47 additions and 3 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ use super::forms::LinkForm;
use super::models::{Count, Link, LoginUser, NewClick, NewLink, NewUser, User};
use crate::ServerError;
fn establish_connection() -> Result<SqliteConnection, ServerError> {
pub(super) fn establish_connection() -> Result<SqliteConnection, ServerError> {
dotenv().ok();
let database_url = std::env::var("DATABASE_URL")?;