about summary refs log tree commit diff
path: root/users/Profpatsch/whatcd-resolver/src
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/src')
-rw-r--r--users/Profpatsch/whatcd-resolver/src/Redacted.hs4
-rw-r--r--users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs16
2 files changed, 10 insertions, 10 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/Redacted.hs b/users/Profpatsch/whatcd-resolver/src/Redacted.hs
index 1363d1677231..e5dc29aef98b 100644
--- a/users/Profpatsch/whatcd-resolver/src/Redacted.hs
+++ b/users/Profpatsch/whatcd-resolver/src/Redacted.hs
@@ -389,7 +389,7 @@ getTorrentById dat = do
 
 data GetBestTorrentsFilter = GetBestTorrentsFilter
   { onlyDownloaded :: Bool,
-    onlyArtist :: Maybe (Label "artistId" Natural)
+    onlyArtist :: Maybe (Label "redactedId" Natural)
   }
 
 -- | Find the best torrent for each torrent group (based on the seeding_weight)
@@ -429,7 +429,7 @@ getBestTorrents opts = do
     ( do
         let (onlyArtistB, onlyArtistId) = case opts.onlyArtist of
               Nothing -> (True, 0)
-              Just a -> (False, a.artistId)
+              Just a -> (False, a.redactedId)
         ( opts.onlyDownloaded :: Bool,
           onlyArtistB :: Bool,
           onlyArtistId & fromIntegral @Natural @Int
diff --git a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
index 0d5867e0c0d8..2960986079a5 100644
--- a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
+++ b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
@@ -213,8 +213,8 @@ htmlUi = do
                     let HandlerResponses {htmlWithQueryArgs} = respond
 
                     htmlWithQueryArgs
-                      ( label @"dbId"
-                          <$> (singleQueryArgument "db_id" (Field.utf8 >>> Field.decimalNatural))
+                      ( label @"redactedId"
+                          <$> (singleQueryArgument "redacted_id" (Field.utf8 >>> Field.decimalNatural))
                       )
                       $ \qry _span -> do
                         artistPage qry
@@ -315,7 +315,7 @@ htmlPageChrome body =
     |]
 
 artistPage ::
-  ( HasField "dbId" dat Natural,
+  ( HasField "redactedId" dat Natural,
     MonadPostgres m,
     MonadOtel m,
     MonadLogger m,
@@ -325,11 +325,11 @@ artistPage ::
   dat ->
   m Html
 artistPage dat = runTransaction $ do
-  torrents <- getBestTorrentsTable (Just $ label @"artistId" dat.dbId)
+  torrents <- getBestTorrentsTable (Just $ getLabel @"redactedId" dat)
   pure $
     htmlPageChrome
       [hsx|
-        Artist ID: {dat.dbId}
+        Artist ID: {dat.redactedId}
 
         {torrents}
       |]
@@ -473,7 +473,7 @@ snipsRedactedSearch dat = do
       ]
   runTransaction $ do
     t
-    getBestTorrentsTable (Nothing :: Maybe (Label "artistId" Natural))
+    getBestTorrentsTable (Nothing :: Maybe (Label "redactedId" Natural))
 
 data ArtistFilter = ArtistFilter
   { onlyArtist :: Maybe (Label "artistId" Text)
@@ -486,7 +486,7 @@ getBestTorrentsTable ::
     MonadPostgres m,
     MonadOtel m
   ) =>
-  Maybe (Label "artistId" Natural) ->
+  Maybe (Label "redactedId" Natural) ->
   Transaction m Html
 getBestTorrentsTable artistFilter = do
   bestStale :: [TorrentData ()] <- getBestTorrents GetBestTorrentsFilter {onlyArtist = artistFilter, onlyDownloaded = False}
@@ -527,7 +527,7 @@ getBestTorrentsTable artistFilter = do
                       b.artists
                         <&> ( \a ->
                                 T2
-                                  (label @"url" [fmt|/artist?db_id={a.artistId}|])
+                                  (label @"url" [fmt|/artist?redacted_id={a.artistId}|])
                                   (label @"content" $ Html.toHtml @Text a.artistName)
                             )
                         & mkLinkList