forked from TWS/kalkutago
Rename variable
This commit is contained in:
parent
bc6f06e210
commit
019ccda845
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue