Silence warnings, run cargo fmt
This commit is contained in:
parent
fe1c1d3655
commit
af1c767f5f
77 changed files with 1904 additions and 903 deletions
|
|
@ -1,8 +1,8 @@
|
|||
//! Spot management API handlers for admin UI.
|
||||
|
||||
use axum::{
|
||||
extract::{Path, State},
|
||||
Json,
|
||||
extract::{Path, State},
|
||||
};
|
||||
use chattyness_db::{
|
||||
models::{CreateSpotRequest, Spot, SpotSummary, UpdateSpotRequest},
|
||||
|
|
@ -73,7 +73,8 @@ pub async fn update_spot(
|
|||
.ok_or_else(|| AppError::NotFound("Spot not found".to_string()))?;
|
||||
|
||||
if Some(new_slug.clone()) != existing.slug {
|
||||
let available = spots::is_spot_slug_available(&pool, existing.scene_id, new_slug).await?;
|
||||
let available =
|
||||
spots::is_spot_slug_available(&pool, existing.scene_id, new_slug).await?;
|
||||
if !available {
|
||||
return Err(AppError::Conflict(format!(
|
||||
"Spot slug '{}' is already taken in this scene",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue