Rename variable

This commit is contained in:
D. Scott Boggs 2023-08-26 14:50:05 -04:00
parent bc6f06e210
commit 019ccda845

View file

@ -32,7 +32,7 @@ async fn get_track_check_user(
track_id: i32,
user: &users::Model,
) -> Result<Json<tracks::Model>, Either<Status, api::ErrorResponder>> {
if let Some(Some(user)) = user
if let Some(Some(track)) = user
.find_related(Tracks)
.filter(tracks::Column::Id.eq(track_id))
.one(db)
@ -40,7 +40,7 @@ async fn get_track_check_user(
.transpose()
.map(|it| it.ok())
{
Ok(Json(user))
Ok(Json(track))
} else {
Err(Left(Status::NotFound))
}