Skip to content

Commit

Permalink
Updated database model loading
Browse files Browse the repository at this point in the history
  • Loading branch information
sparky8251 committed Jan 24, 2024
1 parent 71e1419 commit 085fe79
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bot.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::config::Config;
use crate::database::insert_or_update;
use crate::database::models::AccessToken;
use crate::database::models::{AccessToken, CorrectionTimeCooldown, LastSync};
use crate::services::matrix::listener::MatrixListener;
use crate::services::matrix::responder::MatrixResponder;
use crate::services::webhook::listener::WebhookListener;
Expand Down Expand Up @@ -28,6 +28,12 @@ pub async fn init() -> anyhow::Result<()> {
builder
.define::<AccessToken>()
.context("Unable to load access token database model")?;
builder
.define::<LastSync>()
.context("Unable to load last sync database model")?;
builder
.define::<CorrectionTimeCooldown>()
.context("Unable to load correction time cooldown database model")?;
//open db
let db = builder
.create(&path)
Expand Down

0 comments on commit 085fe79

Please sign in to comment.