mirror of
https://github.com/tursom/TursomServer.git
synced 2025-03-14 11:50:08 +08:00
为路由提供完整的HTTP方法注解支持
This commit is contained in:
parent
da620b80e4
commit
75b0b43580
@ -26,7 +26,11 @@ abstract class RoutedHttpHandler<T : HttpContent, in E : ExceptionContent>(
|
||||
}
|
||||
|
||||
override fun handle(content: T) {
|
||||
val handler = router[content.uri].first
|
||||
val router = getRouter(content.method)
|
||||
var handler = router[content.uri].first
|
||||
if (handler == null) {
|
||||
handler = this.router[content.uri].first
|
||||
}
|
||||
if (handler != null) {
|
||||
handler(content)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user