refactor(users/Profpatsch/whatcd-resolver): artistPage hander fn
Change-Id: Ia0f5d358e9be99d39117ba13fce528f418daf416 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11649 Autosubmit: Profpatsch <mail@profpatsch.de> Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
This commit is contained in:
		
							parent
							
								
									87d7c6198d
								
							
						
					
					
						commit
						f79c186909
					
				
					 1 changed files with 8 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -216,7 +216,7 @@ htmlUi = do
 | 
			
		|||
                        ( label @"dbId"
 | 
			
		||||
                            <$> (singleQueryArgument "db_id" Field.utf8)
 | 
			
		||||
                        )
 | 
			
		||||
                    pure $ [fmt|Artist ID: {qry.dbId}|]
 | 
			
		||||
                    artistPage qry
 | 
			
		||||
                ),
 | 
			
		||||
                ( "autorefresh",
 | 
			
		||||
                  respond.plain $ do
 | 
			
		||||
| 
						 | 
				
			
			@ -305,6 +305,13 @@ htmlUi = do
 | 
			
		|||
      </body>
 | 
			
		||||
    |]
 | 
			
		||||
 | 
			
		||||
artistPage :: (HasField "dbId" dat Text, Applicative m) => dat -> m Html
 | 
			
		||||
artistPage dat =
 | 
			
		||||
  pure
 | 
			
		||||
    [hsx|
 | 
			
		||||
    Artist ID: {dat.dbId}
 | 
			
		||||
  |]
 | 
			
		||||
 | 
			
		||||
type Handlers m = HandlerResponses m -> Map Text (m ResponseReceived)
 | 
			
		||||
 | 
			
		||||
data HandlerResponses m = HandlerResponses
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue