redirect to oauth app after creation

This commit is contained in:
Thibault Duplessis 2018-04-08 04:03:53 +02:00
parent 02c2782de9
commit 273a05e8ac

View file

@ -26,8 +26,10 @@ object OAuthApp extends LilaController {
implicit val req = ctx.body
env.forms.app.create.bindFromRequest.fold(
err => BadRequest(html.oAuth.app.create(err)).fuccess,
setup => env.appApi.create(setup make me) inject
Redirect(routes.OAuthApp.index)
setup => {
val app = setup make me
env.appApi.create(app) inject Redirect(routes.OAuthApp.edit(app.clientId.value))
}
)
}