mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 22:45:51 +01:00
Add Result case classes for plugin
This commit is contained in:
@@ -9,6 +9,7 @@ import plugin.PluginRegistry
|
||||
import service.SystemSettingsService
|
||||
import util.Keys
|
||||
import app.Context
|
||||
import plugin.Results._
|
||||
|
||||
class PluginActionFilter extends Filter with SystemSettingsService {
|
||||
|
||||
@@ -39,6 +40,11 @@ class PluginActionFilter extends Filter with SystemSettingsService {
|
||||
// TODO title of plugin action
|
||||
res.getWriter.write(html.main("TODO")(x).body)
|
||||
res.getWriter.flush()
|
||||
case Redirect(x) =>
|
||||
res.sendRedirect(x)
|
||||
case Fragment(x) =>
|
||||
res.getWriter.write(x.body)
|
||||
res.getWriter.flush()
|
||||
}
|
||||
}.getOrElse {
|
||||
chain.doFilter(req, res)
|
||||
|
||||
Reference in New Issue
Block a user