diff options
author | Profpatsch <mail@profpatsch.de> | 2024-05-11T20·21+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-05-13T14·50+0000 |
commit | f79c1869093b779a4498b3dc832da0304ff14d90 (patch) | |
tree | c08be5e3554954dbd8f6de019117bd5904c18f8c /users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs | |
parent | 87d7c6198d9d2c5bf51a189bc88f715d8da64141 (diff) |
refactor(users/Profpatsch/whatcd-resolver): artistPage hander fn r/8130
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
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs')
-rw-r--r-- | users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs index 28aa0f2b10da..26213c5fea32 100644 --- a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs +++ b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs @@ -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 |