Fixes from code overview session #5

Merged
nicole merged 3 commits from code-review-fixes into main 2024-06-09 01:17:55 +00:00
3 changed files with 2 additions and 5 deletions
Showing only changes of commit 30473344af - Show all commits

View file

@ -6,4 +6,4 @@ file = "src/schema.rs"
custom_type_derives = ["diesel::query_builder::QueryId", "Clone"] custom_type_derives = ["diesel::query_builder::QueryId", "Clone"]
[migrations_directory] [migrations_directory]
dir = "/home/nicole/Code/pique/migrations" dir = "./migrations"

View file

@ -3,7 +3,7 @@ use diesel::r2d2::{ConnectionManager, Pool};
use diesel::SqliteConnection; use diesel::SqliteConnection;
use diesel_migrations::{embed_migrations, EmbeddedMigrations, MigrationHarness}; use diesel_migrations::{embed_migrations, EmbeddedMigrations, MigrationHarness};
pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!(); pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("./migrations/");
/// Establishes a connection to the database using the given URL. /// Establishes a connection to the database using the given URL.
/// ///

View file

@ -5,7 +5,6 @@ use axum::routing::{get, post};
use axum::Router; use axum::Router;
use axum_login::AuthManagerLayerBuilder; use axum_login::AuthManagerLayerBuilder;
use clap::Parser; use clap::Parser;
use diesel_migrations::{embed_migrations, EmbeddedMigrations};
use tower_http::services::ServeDir; use tower_http::services::ServeDir;
use tower_http::trace::{DefaultOnRequest, DefaultOnResponse, TraceLayer}; use tower_http::trace::{DefaultOnRequest, DefaultOnResponse, TraceLayer};
use tower_sessions::SessionManagerLayer; use tower_sessions::SessionManagerLayer;
@ -27,8 +26,6 @@ use crate::logging::setup_logging;
use crate::provider::Provider; use crate::provider::Provider;
use crate::templates::make_template_loader; use crate::templates::make_template_loader;
pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("./migrations/");
pub async fn run() -> Result<()> { pub async fn run() -> Result<()> {
dotenvy::dotenv()?; dotenvy::dotenv()?;
setup_logging(); setup_logging();