refactor(users/Profpatsch/whatcd-resolver): inline h
Change-Id: If14bc2d72b28a3022067f42b63596a745ad891d9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11645 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									173e864f30
								
							
						
					
					
						commit
						d119d07aaa
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
					@ -323,15 +323,14 @@ runHandlers defaultHandler handlers req respond = withRunInIO $ \runInIO -> do
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
          ( \span -> do
 | 
					          ( \span -> do
 | 
				
			||||||
              res <- act span
 | 
					              res <- act span <&> (\html -> T2 (label @"html" html) (label @"extraHeaders" []))
 | 
				
			||||||
              liftIO $ respond . Wai.responseLBS Http.ok200 ([("Content-Type", "text/html")] <> res.extraHeaders) . Html.renderHtml $ res.html
 | 
					              liftIO $ respond . Wai.responseLBS Http.ok200 ([("Content-Type", "text/html")] <> res.extraHeaders) . Html.renderHtml $ res.html
 | 
				
			||||||
          )
 | 
					          )
 | 
				
			||||||
  let h route act = hh route (\span -> act span <&> (\html -> T2 (label @"html" html) (label @"extraHeaders" [])))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let path = [fmt|/{req & Wai.pathInfo & Text.intercalate "/"}|]
 | 
					  let path = [fmt|/{req & Wai.pathInfo & Text.intercalate "/"}|]
 | 
				
			||||||
  let handlerResponses =
 | 
					  let handlerResponses =
 | 
				
			||||||
        ( HandlerResponses
 | 
					        ( HandlerResponses
 | 
				
			||||||
            { html = h path,
 | 
					            { html = hh path,
 | 
				
			||||||
              plain = (\m -> liftIO $ runInIO m >>= respond)
 | 
					              plain = (\m -> liftIO $ runInIO m >>= respond)
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue