forked from TWS/kalkutago
Compare commits
2 commits
bc6f06e210
...
033f2a561b
Author | SHA1 | Date | |
---|---|---|---|
D. Scott Boggs | 033f2a561b | ||
D. Scott Boggs | 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))
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ impl Update {
|
|||
if receiver_count > 0 {
|
||||
trace!(receiver_count = receiver_count, update = as_serde!(self); "sending update");
|
||||
let count = tx.send(self.clone())?;
|
||||
trace!(count = count; "update sent");
|
||||
} else {
|
||||
trace!("no update receivers, skipping message");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue