backend: use ActiveModel
This commit is contained in:
parent
1dfe2f8ed6
commit
29525608ed
1 changed files with 2 additions and 2 deletions
|
@ -68,12 +68,12 @@ impl LicenseController {
|
|||
|
||||
pub async fn update_license(
|
||||
state: web::Data<AppState>,
|
||||
license: web::Json<entity::license::Model>,
|
||||
license: web::Json<entity::license::ActiveModel>,
|
||||
path: Path<Uuid>,
|
||||
_executor: AuthedUser,
|
||||
) -> actix_web::Result<impl Responder> {
|
||||
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)?;
|
||||
|
|
Loading…
Reference in a new issue