mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Refactor
This commit is contained in:
		
							parent
							
								
									faedeebee9
								
							
						
					
					
						commit
						1c069ab643
					
				
					 2 changed files with 1 additions and 2 deletions
				
			
		|  | @ -14,7 +14,7 @@ FILTER_METHODS = %w(get post put patch delete options all) | ||||||
|   end |   end | ||||||
| {% end %} | {% end %} | ||||||
| 
 | 
 | ||||||
| def ws(path : String, &block : HTTP::WebSocket, HTTP::Server::Context -> Void) | def ws(path : String, &block : HTTP::WebSocket, HTTP::Server::Context -> _) | ||||||
|   raise Kemal::Exceptions::InvalidPathStartException.new("ws", path) unless Kemal::Utils.path_starts_with_slash?(path) |   raise Kemal::Exceptions::InvalidPathStartException.new("ws", path) unless Kemal::Utils.path_starts_with_slash?(path) | ||||||
|   Kemal::WebSocketHandler.new path, &block |   Kemal::WebSocketHandler.new path, &block | ||||||
| end | end | ||||||
|  |  | ||||||
|  | @ -5,7 +5,6 @@ module Kemal | ||||||
|   struct Route |   struct Route | ||||||
|     getter method, path, handler |     getter method, path, handler | ||||||
|     @handler : HTTP::Server::Context -> String |     @handler : HTTP::Server::Context -> String | ||||||
|     @method : String |  | ||||||
| 
 | 
 | ||||||
|     def initialize(@method : String, @path : String, &handler : HTTP::Server::Context -> _) |     def initialize(@method : String, @path : String, &handler : HTTP::Server::Context -> _) | ||||||
|       @handler = ->(context : HTTP::Server::Context) do |       @handler = ->(context : HTTP::Server::Context) do | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue