Commit 275ea092 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[nodeStory] attempt to fix type error for sql

parent 755685d6
Pipeline #3171 canceled with stage
......@@ -111,6 +111,7 @@ import GHC.Generics (Generic)
import Gargantext.API.Ngrams.Types
import Gargantext.Core.Types (ListId, NodeId(..), NodeType)
import Gargantext.Core.Utils.Prefix (unPrefix)
import Gargantext.Database.Admin.Config (nodeTypeId)
import Gargantext.Database.Prelude (CmdM', HasConnectionPool(..), HasConfig)
import Gargantext.Database.Query.Table.Node.Error (HasNodeError())
import Gargantext.Prelude
......@@ -327,7 +328,7 @@ nodeExists c nId = (== [PGS.Only True])
getNodesIdWithType :: PGS.Connection -> NodeType -> IO [NodeId]
getNodesIdWithType c nt = do
ns <- runPGSQuery c query (PGS.Only nt)
ns <- runPGSQuery c query (PGS.Only $ nodeTypeId nt)
pure $ map (\(PGS.Only nId) -> NodeId nId) ns
where
query :: PGS.Query
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment