Init
This commit is contained in:
@@ -105,10 +105,11 @@ pub async fn category_update(
|
||||
|
||||
let active = category.into_active_model();
|
||||
|
||||
// let category: category::Model = serializer
|
||||
// .apply_to_active_model(active)
|
||||
// .update(app_state.db.get_connection())
|
||||
// .await?;
|
||||
// todo : voir pour virer le into_active_model pour utiliser le dto
|
||||
let category: category::Model = serializer
|
||||
.apply_to_active_model(active)
|
||||
.update(app_state.db.get_connection())
|
||||
.await?;
|
||||
|
||||
log::info!("PUT /categories/{id}/ - Category updated: {}", id);
|
||||
Ok(Json(CategoryResponse::from(category)))
|
||||
|
||||
Reference in New Issue
Block a user