Skip to content

Commit

Permalink
updated loco
Browse files Browse the repository at this point in the history
  • Loading branch information
DenuxPlays committed Jan 11, 2025
1 parent 5551611 commit 78b96d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use loco_rs::{
};
use migration::Migrator;
use mimalloc::MiMalloc;
use sea_orm::DatabaseConnection;
use std::path::Path;

#[global_allocator]
Expand Down Expand Up @@ -112,15 +111,16 @@ impl Hooks for App {
// tasks-inject (do not remove)
}

async fn truncate(db: &DatabaseConnection) -> Result<()> {
async fn truncate(ctx: &AppContext) -> Result<()> {
let db = &ctx.db;
// TODO add all other tables
truncate_table(db, users::Entity).await?;
truncate_table(db, instances::Entity).await?;

Ok(())
}

async fn seed(_db: &DatabaseConnection, _path: &Path) -> Result<()> {
async fn seed(_ctx: &AppContext, _path: &Path) -> Result<()> {
Ok(())
}
}

0 comments on commit 78b96d5

Please sign in to comment.