Skip to content

Commit

Permalink
reset broadcast round with API
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jun 25, 2024
1 parent e2fe02b commit 8125ff0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/controllers/RelayRound.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ final class RelayRound(
)
}

def reset(id: RelayRoundId) = Auth { ctx ?=> me ?=>
def reset(id: RelayRoundId) = AuthOrScoped(_.Study.Write) { ctx ?=> me ?=>
Found(env.relay.api.byIdAndContributor(id)): rt =>
env.relay.api.reset(rt.round).inject(Redirect(rt.path))
env.relay.api
.reset(rt.round)
.flatMap: _ =>
negotiate(Redirect(rt.path), jsonOkResult)
}

def show(ts: String, rs: String, id: RelayRoundId, embed: Option[UserStr]) =
Expand Down

0 comments on commit 8125ff0

Please sign in to comment.