I have created new action composition and in some cases i need return forbidden how to do it correctly ?
public class VerboseAction extends play.mvc.Action.Simple {
public F.Promise<SimpleResult> call(Http.Context ctx) throws Throwable {
Logger.debug(ctx.request().username());
//return delegate.call(ctx);
return forbidden();
}
}
You need to return a Promise<SimpleResult>.
return F.Promise.pure((SimpleResult) forbidden());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With