Feature: User auth #15

Merged
scott merged 29 commits from scott/kalkutago:feature/user-auth into main 2023-08-27 08:00:57 -04:00
Showing only changes of commit 019ccda845 - Show all commits

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))
}