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:
Profpatsch 2024-05-11 22:21:23 +02:00 committed by clbot
parent 87d7c6198d
commit f79c186909

View file

@ -216,7 +216,7 @@ htmlUi = do
( label @"dbId" ( label @"dbId"
<$> (singleQueryArgument "db_id" Field.utf8) <$> (singleQueryArgument "db_id" Field.utf8)
) )
pure $ [fmt|Artist ID: {qry.dbId}|] artistPage qry
), ),
( "autorefresh", ( "autorefresh",
respond.plain $ do respond.plain $ do
@ -305,6 +305,13 @@ htmlUi = do
</body> </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) type Handlers m = HandlerResponses m -> Map Text (m ResponseReceived)
data HandlerResponses m = HandlerResponses data HandlerResponses m = HandlerResponses