diff --git a/src/api/v1/forms.rs b/src/api/v1/forms.rs index aa51c54..2f70461 100644 --- a/src/api/v1/forms.rs +++ b/src/api/v1/forms.rs @@ -14,14 +14,11 @@ * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ -use std::collections::HashMap; - use actix_web::{web, HttpResponse, Responder}; use actix_web_httpauth::middleware::HttpAuthentication; use libforms::*; use serde::{Deserialize, Serialize}; -use crate::db::FormSubmission; use crate::errors::*; use crate::AppCtx; use crate::*; diff --git a/src/main.rs b/src/main.rs index e9fe0cd..375dcac 100644 --- a/src/main.rs +++ b/src/main.rs @@ -115,6 +115,7 @@ async fn main() -> std::io::Result<()> { async fn serve(settings: Settings, ctx: AppCtx) -> std::io::Result<()> { let ip = settings.server.get_ip(); + ctx.db.migrate().await.unwrap(); println!("Starting server on: http://{ip}"); HttpServer::new(move || {