From 29525608ed173411d0ddbd054f619eddb4fd452c Mon Sep 17 00:00:00 2001 From: Sphereso Date: Thu, 11 Jul 2024 21:09:00 +0200 Subject: [PATCH] backend: use ActiveModel --- crates/backend/src/controller/license.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/backend/src/controller/license.rs b/crates/backend/src/controller/license.rs index 36c9782..fa8fe3f 100644 --- a/crates/backend/src/controller/license.rs +++ b/crates/backend/src/controller/license.rs @@ -68,12 +68,12 @@ impl LicenseController { pub async fn update_license( state: web::Data, - license: web::Json, + license: web::Json, path: Path, _executor: AuthedUser, ) -> actix_web::Result { let db = &state.db; - let mut license = license.into_inner().into_active_model(); + let mut license = license.into_inner(); let id = path.into_inner(); license.id = ActiveValue::Unchanged(id); let res = license.update(db).await.map_err(ErrorInternalServerError)?;