mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Format code
This commit is contained in:
		
							parent
							
								
									4c9b9ad3d5
								
							
						
					
					
						commit
						5a58ee3cbb
					
				
					 5 changed files with 1 additions and 6 deletions
				
			
		|  | @ -143,7 +143,6 @@ describe "Kemal::Middleware::Filters" do | |||
|     client_response = HTTP::Client::Response.from_io(io_with_context, decompress: false) | ||||
|     client_response.body.should eq("false") | ||||
|   end | ||||
| 
 | ||||
| end | ||||
| 
 | ||||
| class FilterTest | ||||
|  |  | |||
|  | @ -18,6 +18,5 @@ class HTTP::Server | |||
|     def route_defined? | ||||
|       route_lookup.found? | ||||
|     end | ||||
| 
 | ||||
|   end | ||||
| end | ||||
|  |  | |||
|  | @ -85,7 +85,7 @@ end | |||
| #  - after_all, after_get, after_post, after_put, after_patch, after_delete | ||||
| 
 | ||||
| ALL_METHODS = %w(get post put patch delete all) | ||||
| {% for type in ["before", "after"]%} | ||||
| {% for type in ["before", "after"] %} | ||||
|   {% for method in ALL_METHODS %} | ||||
|     def {{type.id}}_{{method.id}}(path = "*", &block : HTTP::Server::Context -> _) | ||||
|      Kemal::Middleware::Filter::INSTANCE.{{type.id}}({{method}}.upcase, path, &block) | ||||
|  |  | |||
|  | @ -25,5 +25,4 @@ class HTTP::Request | |||
|     override_method = override_method.upcase | ||||
|     override_method == "PUT" || override_method == "PATCH" || override_method == "DELETE" | ||||
|   end | ||||
| 
 | ||||
| end | ||||
|  |  | |||
|  | @ -7,6 +7,4 @@ class Kemal::Route | |||
| 
 | ||||
|   def initialize(@method, @path, &@handler : HTTP::Server::Context -> _) | ||||
|   end | ||||
| 
 | ||||
| 
 | ||||
| end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue