Server API v1 #1
@ -20,8 +20,8 @@ pub mod models;
|
||||
|
||||
pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("./migrations");
|
||||
|
||||
pub fn establish_connection(database_url: &String) -> Result<PgConnection, Box<dyn error::Error>> {
|
||||
Ok(PgConnection::establish(&database_url)?)
|
||||
pub fn establish_connection(database_url: &str) -> Result<PgConnection, Box<dyn error::Error>> {
|
||||
Ok(PgConnection::establish(database_url)?)
|
||||
}
|
||||
|
||||
pub fn run_migrations(
|
||||
|
Loading…
x
Reference in New Issue
Block a user