Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
160
Issues
160
List
Board
Labels
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
87b2e8dc
Commit
87b2e8dc
authored
Dec 02, 2024
by
Grégoire Locqueville
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed `Cmd` -> `DBCmdExtra`
parent
a1254f2a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
25 deletions
+25
-25
Node.hs
src/Gargantext/API/Node.hs
+5
-5
Export.hs
src/Gargantext/API/Node/Corpus/Export.hs
+2
-2
Public.hs
src/Gargantext/API/Server/Named/Public.hs
+2
-2
Pairing.hs
src/Gargantext/Database/Action/Flow/Pairing.hs
+2
-2
Share.hs
src/Gargantext/Database/Action/Share.hs
+6
-6
New.hs
src/Gargantext/Database/Action/User/New.hs
+2
-2
Prelude.hs
src/Gargantext/Database/Prelude.hs
+1
-1
Update.hs
src/Gargantext/Database/Query/Table/Node/Update.hs
+5
-5
No files found.
src/Gargantext/API/Node.hs
View file @
87b2e8dc
...
@@ -59,7 +59,7 @@ import Gargantext.Database.Action.Flow.Pairing (pairing)
...
@@ -59,7 +59,7 @@ import Gargantext.Database.Action.Flow.Pairing (pairing)
import
Gargantext.Database.Admin.Types.Hyperdata
(
HyperdataAny
,
HyperdataCorpus
,
HyperdataAnnuaire
)
import
Gargantext.Database.Admin.Types.Hyperdata
(
HyperdataAny
,
HyperdataCorpus
,
HyperdataAnnuaire
)
import
Gargantext.Database.Admin.Types.Hyperdata.Prelude
(
HyperdataC
)
import
Gargantext.Database.Admin.Types.Hyperdata.Prelude
(
HyperdataC
)
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Prelude
(
Cmd
,
JSONB
)
import
Gargantext.Database.Prelude
(
DBCmdExtra
,
JSONB
)
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.Node
import
Gargantext.Database.Query.Table.Node.Children
(
getChildren
)
import
Gargantext.Database.Query.Table.Node.Children
(
getChildren
)
import
Gargantext.Database.Query.Table.Node.Update
(
Update
(
..
),
update
)
import
Gargantext.Database.Query.Table.Node.Update
(
Update
(
..
),
update
)
...
@@ -143,7 +143,7 @@ type ScoreApi = Summary " To Score NodeNodes"
...
@@ -143,7 +143,7 @@ type ScoreApi = Summary " To Score NodeNodes"
scoreApi
::
CorpusId
->
GargServer
ScoreApi
scoreApi
::
CorpusId
->
GargServer
ScoreApi
scoreApi
=
putScore
scoreApi
=
putScore
where
where
putScore
::
CorpusId
->
NodesToScore
->
Cmd
err
[
Int
]
putScore
::
CorpusId
->
NodesToScore
->
DBCmdExtra
err
[
Int
]
putScore
cId
cs'
=
nodeContextsScore
$
map
(
\
n
->
(
cId
,
n
,
nts_score
cs'
))
(
nts_nodesId
cs'
)
putScore
cId
cs'
=
nodeContextsScore
$
map
(
\
n
->
(
cId
,
n
,
nts_score
cs'
))
(
nts_nodesId
cs'
)
------------------------------------------------------------------------
------------------------------------------------------------------------
...
@@ -182,20 +182,20 @@ treeFlatAPI authenticatedUser rootId =
...
@@ -182,20 +182,20 @@ treeFlatAPI authenticatedUser rootId =
------------------------------------------------------------------------
------------------------------------------------------------------------
-- | TODO Check if the name is less than 255 char
-- | TODO Check if the name is less than 255 char
rename
::
HasNodeError
err
=>
UserId
->
NodeId
->
RenameNode
->
Cmd
err
[
Int
]
rename
::
HasNodeError
err
=>
UserId
->
NodeId
->
RenameNode
->
DBCmdExtra
err
[
Int
]
rename
loggedInUserId
nId
(
RenameNode
name'
)
=
U
.
update
loggedInUserId
(
U
.
Rename
nId
name'
)
rename
loggedInUserId
nId
(
RenameNode
name'
)
=
U
.
update
loggedInUserId
(
U
.
Rename
nId
name'
)
putNode
::
forall
err
a
.
(
HyperdataC
a
)
putNode
::
forall
err
a
.
(
HyperdataC
a
)
=>
NodeId
=>
NodeId
->
a
->
a
->
Cmd
err
Int
->
DBCmdExtra
err
Int
putNode
n
h
=
fromIntegral
<$>
updateHyperdata
n
h
putNode
n
h
=
fromIntegral
<$>
updateHyperdata
n
h
moveNode
::
HasNodeError
err
moveNode
::
HasNodeError
err
=>
UserId
=>
UserId
->
NodeId
->
NodeId
->
ParentId
->
ParentId
->
Cmd
err
[
Int
]
->
DBCmdExtra
err
[
Int
]
moveNode
loggedInUserId
n
p
=
update
loggedInUserId
(
Move
n
p
)
moveNode
loggedInUserId
n
p
=
update
loggedInUserId
(
Move
n
p
)
-------------------------------------------------------------
-------------------------------------------------------------
...
...
src/Gargantext/API/Node/Corpus/Export.hs
View file @
87b2e8dc
...
@@ -34,7 +34,7 @@ import Gargantext.Database.Admin.Types.Node
...
@@ -34,7 +34,7 @@ import Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Action.Metrics.NgramsByContext
(
getNgramsByContextOnlyUser
)
import
Gargantext.Database.Action.Metrics.NgramsByContext
(
getNgramsByContextOnlyUser
)
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Types.Hyperdata.Document
(
HyperdataDocument
(
..
)
)
import
Gargantext.Database.Admin.Types.Hyperdata.Document
(
HyperdataDocument
(
..
)
)
import
Gargantext.Database.Prelude
(
Cmd
)
import
Gargantext.Database.Prelude
(
DBCmdExtra
)
import
Gargantext.Database.Query.Table.Node
(
defaultList
)
import
Gargantext.Database.Query.Table.Node
(
defaultList
)
import
Gargantext.Database.Query.Table.Node.Error
(
HasNodeError
)
import
Gargantext.Database.Query.Table.Node.Error
(
HasNodeError
)
import
Gargantext.Database.Query.Table.Node.Select
(
selectNodesWithUsername
)
import
Gargantext.Database.Query.Table.Node.Select
(
selectNodesWithUsername
)
...
@@ -95,7 +95,7 @@ getContextNgrams :: HasNodeError err
...
@@ -95,7 +95,7 @@ getContextNgrams :: HasNodeError err
->
ListType
->
ListType
->
NgramsType
->
NgramsType
->
NodeListStory
->
NodeListStory
->
Cmd
err
(
Map
ContextId
(
Set
NgramsTerm
))
->
DBCmdExtra
err
(
Map
ContextId
(
Set
NgramsTerm
))
getContextNgrams
cId
lId
listType
nt
repo
=
do
getContextNgrams
cId
lId
listType
nt
repo
=
do
-- lId <- case lId' of
-- lId <- case lId' of
-- Nothing -> defaultList cId
-- Nothing -> defaultList cId
...
...
src/Gargantext/API/Server/Named/Public.hs
View file @
87b2e8dc
...
@@ -17,7 +17,7 @@ import Gargantext.Database.Admin.Types.Hyperdata.Corpus ( hc_fields )
...
@@ -17,7 +17,7 @@ import Gargantext.Database.Admin.Types.Hyperdata.Corpus ( hc_fields )
import
Gargantext.Database.Admin.Types.Hyperdata.CorpusField
import
Gargantext.Database.Admin.Types.Hyperdata.CorpusField
import
Gargantext.Database.Admin.Types.Hyperdata.Folder
(
HyperdataFolder
)
import
Gargantext.Database.Admin.Types.Hyperdata.Folder
(
HyperdataFolder
)
import
Gargantext.Database.Admin.Types.Node
(
NodeId
(
..
),
Node
,
unNodeId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeId
(
..
),
Node
,
unNodeId
)
import
Gargantext.Database.Prelude
(
Cmd
,
DBCmd
)
import
Gargantext.Database.Prelude
(
DBCmd
,
DBCmdExtra
)
import
Gargantext.Database.Query.Table.Node.Error
(
HasNodeError
(
..
))
import
Gargantext.Database.Query.Table.Node.Error
(
HasNodeError
(
..
))
import
Gargantext.Database.Query.Table.NodeNode
(
selectPublicNodes
)
import
Gargantext.Database.Query.Table.NodeNode
(
selectPublicNodes
)
import
Gargantext.Database.Schema.Node
(
NodePoly
(
..
),
node_date
,
node_hyperdata
)
-- (NodePoly(..))
import
Gargantext.Database.Schema.Node
(
NodePoly
(
..
),
node_date
,
node_hyperdata
)
-- (NodePoly(..))
...
@@ -68,7 +68,7 @@ filterPublicDatas datas =
...
@@ -68,7 +68,7 @@ filterPublicDatas datas =
&
Map
.
elems
&
Map
.
elems
publicNodes
::
HasNodeError
err
publicNodes
::
HasNodeError
err
=>
Cmd
err
(
Set
NodeId
)
=>
DBCmdExtra
err
(
Set
NodeId
)
publicNodes
=
do
publicNodes
=
do
candidates
<-
filterPublicDatas
<$>
selectPublicNodes
candidates
<-
filterPublicDatas
<$>
selectPublicNodes
pure
$
Set
.
fromList
pure
$
Set
.
fromList
...
...
src/Gargantext/Database/Action/Flow/Pairing.hs
View file @
87b2e8dc
...
@@ -36,7 +36,7 @@ import Gargantext.Database.Action.Metrics.NgramsByContext (getContextsByNgramsOn
...
@@ -36,7 +36,7 @@ import Gargantext.Database.Action.Metrics.NgramsByContext (getContextsByNgramsOn
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Config
(
userMaster
)
import
Gargantext.Database.Admin.Types.Hyperdata.Contact
(
HyperdataContact
,
cw_firstName
,
cw_lastName
,
hc_who
)
-- (HyperdataContact(..))
import
Gargantext.Database.Admin.Types.Hyperdata.Contact
(
HyperdataContact
,
cw_firstName
,
cw_lastName
,
hc_who
)
-- (HyperdataContact(..))
import
Gargantext.Database.Admin.Types.Node
-- (AnnuaireId, CorpusId, ListId, DocId, ContactId, NodeId)
import
Gargantext.Database.Admin.Types.Node
-- (AnnuaireId, CorpusId, ListId, DocId, ContactId, NodeId)
import
Gargantext.Database.Prelude
(
Cmd
,
DBCmd
,
runOpaQuery
)
import
Gargantext.Database.Prelude
(
DBCmd
,
DBCmdExtra
,
runOpaQuery
)
import
Gargantext.Database.Query.Prelude
(
returnA
)
import
Gargantext.Database.Query.Prelude
(
returnA
)
import
Gargantext.Database.Query.Table.Node
(
defaultList
)
import
Gargantext.Database.Query.Table.Node
(
defaultList
)
import
Gargantext.Database.Query.Table.Node.Children
(
getAllContacts
)
import
Gargantext.Database.Query.Table.Node.Children
(
getAllContacts
)
...
@@ -51,7 +51,7 @@ import Opaleye
...
@@ -51,7 +51,7 @@ import Opaleye
-- | isPairedWith
-- | isPairedWith
-- All NodeAnnuaire paired with a Corpus of NodeId nId:
-- All NodeAnnuaire paired with a Corpus of NodeId nId:
-- isPairedWith NodeAnnuaire corpusId
-- isPairedWith NodeAnnuaire corpusId
isPairedWith
::
NodeId
->
NodeType
->
Cmd
err
[
NodeId
]
isPairedWith
::
NodeId
->
NodeType
->
DBCmdExtra
err
[
NodeId
]
isPairedWith
nId
nt
=
runOpaQuery
(
selectQuery
nt
nId
)
isPairedWith
nId
nt
=
runOpaQuery
(
selectQuery
nt
nId
)
where
where
selectQuery
::
NodeType
->
NodeId
->
Select
(
Column
SqlInt4
)
selectQuery
::
NodeType
->
NodeId
->
Select
(
Column
SqlInt4
)
...
...
src/Gargantext/Database/Action/Share.hs
View file @
87b2e8dc
...
@@ -44,7 +44,7 @@ data ShareNodeWith = ShareNodeWith_User !NodeType !User
...
@@ -44,7 +44,7 @@ data ShareNodeWith = ShareNodeWith_User !NodeType !User
|
ShareNodeWith_Node
!
NodeType
!
NodeId
|
ShareNodeWith_Node
!
NodeType
!
NodeId
------------------------------------------------------------------------
------------------------------------------------------------------------
deleteMemberShip
::
HasNodeError
err
=>
[(
SharedFolderId
,
TeamNodeId
)]
->
Cmd
err
[
Int
]
deleteMemberShip
::
HasNodeError
err
=>
[(
SharedFolderId
,
TeamNodeId
)]
->
DBCmdExtra
err
[
Int
]
deleteMemberShip
xs
=
mapM
(
\
(
s
,
t
)
->
deleteNodeNode
s
t
)
xs
deleteMemberShip
xs
=
mapM
(
\
(
s
,
t
)
->
deleteNodeNode
s
t
)
xs
------------------------------------------------------------------------
------------------------------------------------------------------------
...
@@ -56,7 +56,7 @@ type TeamNodeId = NodeId
...
@@ -56,7 +56,7 @@ type TeamNodeId = NodeId
-- Result gives the username and its SharedFolderId that has to be eventually
-- Result gives the username and its SharedFolderId that has to be eventually
-- used for the membership
-- used for the membership
membersOf
::
HasNodeError
err
membersOf
::
HasNodeError
err
=>
TeamNodeId
->
Cmd
err
[(
Text
,
SharedFolderId
)]
=>
TeamNodeId
->
DBCmdExtra
err
[(
Text
,
SharedFolderId
)]
membersOf
nId
=
do
membersOf
nId
=
do
res
<-
runOpaQuery
$
membersOfQuery
nId
res
<-
runOpaQuery
$
membersOfQuery
nId
pure
$
catMaybes
(
uncurryMaybe
<$>
res
)
pure
$
catMaybes
(
uncurryMaybe
<$>
res
)
...
@@ -91,7 +91,7 @@ shareNodeWith :: HasNodeError err
...
@@ -91,7 +91,7 @@ shareNodeWith :: HasNodeError err
->
NodeId
->
NodeId
-- ^ The target node we would like to share, it has
-- ^ The target node we would like to share, it has
-- to be a 'NodeFolderShared'.
-- to be a 'NodeFolderShared'.
->
Cmd
err
Int
->
DBCmdExtra
err
Int
shareNodeWith
(
ShareNodeWith_User
NodeFolderShared
u
)
n
=
do
shareNodeWith
(
ShareNodeWith_User
NodeFolderShared
u
)
n
=
do
nodeToCheck
<-
getNode
n
nodeToCheck
<-
getNode
n
userIdCheck
<-
getUserId
u
userIdCheck
<-
getUserId
u
...
@@ -125,7 +125,7 @@ shareNodeWith (ShareNodeWith_Node NodeFolderPublic nId) n = do
...
@@ -125,7 +125,7 @@ shareNodeWith (ShareNodeWith_Node NodeFolderPublic nId) n = do
shareNodeWith
_
_
=
errorWith
"[G.D.A.S.shareNodeWith] Not implemented for this NodeType"
shareNodeWith
_
_
=
errorWith
"[G.D.A.S.shareNodeWith] Not implemented for this NodeType"
------------------------------------------------------------------------
------------------------------------------------------------------------
getFolderId
::
HasNodeError
err
=>
User
->
NodeType
->
Cmd
err
NodeId
getFolderId
::
HasNodeError
err
=>
User
->
NodeType
->
DBCmdExtra
err
NodeId
getFolderId
u
nt
=
do
getFolderId
u
nt
=
do
rootId
<-
getRootId
u
rootId
<-
getRootId
u
s
<-
getNodesWith
rootId
HyperdataAny
(
Just
nt
)
Nothing
Nothing
s
<-
getNodesWith
rootId
HyperdataAny
(
Just
nt
)
Nothing
Nothing
...
@@ -136,12 +136,12 @@ getFolderId u nt = do
...
@@ -136,12 +136,12 @@ getFolderId u nt = do
------------------------------------------------------------------------
------------------------------------------------------------------------
type
TeamId
=
NodeId
type
TeamId
=
NodeId
delFolderTeam
::
HasNodeError
err
=>
User
->
TeamId
->
Cmd
err
Int
delFolderTeam
::
HasNodeError
err
=>
User
->
TeamId
->
DBCmdExtra
err
Int
delFolderTeam
u
nId
=
do
delFolderTeam
u
nId
=
do
folderSharedId
<-
getFolderId
u
NodeFolderShared
folderSharedId
<-
getFolderId
u
NodeFolderShared
deleteNodeNode
folderSharedId
nId
deleteNodeNode
folderSharedId
nId
unshare
::
HasNodeError
err
unshare
::
HasNodeError
err
=>
ParentId
->
NodeId
=>
ParentId
->
NodeId
->
Cmd
err
Int
->
DBCmdExtra
err
Int
unshare
p
n
=
deleteNodeNode
p
n
unshare
p
n
=
deleteNodeNode
p
n
src/Gargantext/Database/Action/User/New.hs
View file @
87b2e8dc
...
@@ -34,7 +34,7 @@ import Gargantext.Core.Mail.Types (HasMail, mailSettings)
...
@@ -34,7 +34,7 @@ import Gargantext.Core.Mail.Types (HasMail, mailSettings)
import
Gargantext.Core.Types.Individu
import
Gargantext.Core.Types.Individu
import
Gargantext.Database.Action.Flow
(
getOrMkRoot
)
import
Gargantext.Database.Action.Flow
(
getOrMkRoot
)
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Prelude
(
Cmd
,
DBCmd
,
IsDBCmdExtra
,
DBCmdWithEnv
)
import
Gargantext.Database.Prelude
(
DBCmd
,
DBCmdExtra
,
IsDBCmdExtra
,
DBCmdWithEnv
)
import
Gargantext.Database.Query.Table.Node.Error
(
HasNodeError
(
..
),
nodeError
,
NodeError
(
..
))
import
Gargantext.Database.Query.Table.Node.Error
(
HasNodeError
(
..
),
nodeError
,
NodeError
(
..
))
import
Gargantext.Database.Query.Table.User
import
Gargantext.Database.Query.Table.User
import
Gargantext.Prelude
import
Gargantext.Prelude
...
@@ -121,7 +121,7 @@ newUsers' cfg us = do
...
@@ -121,7 +121,7 @@ newUsers' cfg us = do
------------------------------------------------------------------------
------------------------------------------------------------------------
-- | Updates a user's password, notifying the user via email, if necessary.
-- | Updates a user's password, notifying the user via email, if necessary.
updateUser
::
HasNodeError
err
updateUser
::
HasNodeError
err
=>
SendEmail
->
MailConfig
->
NewUser
GargPassword
->
Cmd
err
Int64
=>
SendEmail
->
MailConfig
->
NewUser
GargPassword
->
DBCmdExtra
err
Int64
updateUser
(
SendEmail
send
)
cfg
u
=
do
updateUser
(
SendEmail
send
)
cfg
u
=
do
u'
<-
liftBase
$
toUserHash
u
u'
<-
liftBase
$
toUserHash
u
n
<-
updateUserDB
$
toUserWrite
u'
n
<-
updateUserDB
$
toUserWrite
u'
...
...
src/Gargantext/Database/Prelude.hs
View file @
87b2e8dc
...
@@ -97,7 +97,7 @@ type CmdM'' env err m =
...
@@ -97,7 +97,7 @@ type CmdM'' env err m =
type
Cmd''
env
err
a
=
forall
m
.
CmdM''
env
err
m
=>
m
a
type
Cmd''
env
err
a
=
forall
m
.
CmdM''
env
err
m
=>
m
a
type
Cmd'
env
err
a
=
forall
m
.
IsCmd
env
err
m
=>
m
a
type
Cmd'
env
err
a
=
forall
m
.
IsCmd
env
err
m
=>
m
a
type
Cmd
err
a
=
forall
m
env
.
IsDBCmdExtra
env
err
m
=>
m
a
type
DBCmdExtra
err
a
=
forall
m
env
.
IsDBCmdExtra
env
err
m
=>
m
a
type
DBCmdWithEnv
env
err
a
=
forall
m
.
IsDBCmd
env
err
m
=>
m
a
type
DBCmdWithEnv
env
err
a
=
forall
m
.
IsDBCmd
env
err
m
=>
m
a
type
DBCmd
err
a
=
forall
m
env
.
IsDBCmd
env
err
m
=>
m
a
type
DBCmd
err
a
=
forall
m
env
.
IsDBCmd
env
err
m
=>
m
a
...
...
src/Gargantext/Database/Query/Table/Node/Update.hs
View file @
87b2e8dc
...
@@ -24,7 +24,7 @@ import Gargantext.Core.Notifications.CentralExchange.Types qualified as CE
...
@@ -24,7 +24,7 @@ import Gargantext.Core.Notifications.CentralExchange.Types qualified as CE
import
Gargantext.Core.Types
(
Name
)
import
Gargantext.Core.Types
(
Name
)
import
Gargantext.Database.Admin.Config
()
import
Gargantext.Database.Admin.Config
()
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Admin.Types.Node
import
Gargantext.Database.Prelude
(
Cmd
,
DBCmd
,
runPGSQuery
)
import
Gargantext.Database.Prelude
(
DBCmd
,
DBCmdExtra
,
runPGSQuery
)
import
Gargantext.Database.Query.Table.Node.Error
import
Gargantext.Database.Query.Table.Node.Error
import
Gargantext.Database.Query.Table.Node
(
getParentId
,
getNode
,
getUserRootPublicNode
)
import
Gargantext.Database.Query.Table.Node
(
getParentId
,
getNode
,
getUserRootPublicNode
)
import
Gargantext.Database.Query.Table.NodeNode
(
isNodeReadOnly
,
SourceId
(
..
),
TargetId
(
..
),
publishNode
,
unpublishNode
)
import
Gargantext.Database.Query.Table.NodeNode
(
isNodeReadOnly
,
SourceId
(
..
),
TargetId
(
..
),
publishNode
,
unpublishNode
)
...
@@ -48,7 +48,7 @@ unOnly :: Only a -> a
...
@@ -48,7 +48,7 @@ unOnly :: Only a -> a
unOnly
(
Only
a
)
=
a
unOnly
(
Only
a
)
=
a
-- | Prefer this, because it notifies parents of the node change
-- | Prefer this, because it notifies parents of the node change
update
::
HasNodeError
err
=>
UserId
->
Update
->
Cmd
err
[
Int
]
update
::
HasNodeError
err
=>
UserId
->
Update
->
DBCmdExtra
err
[
Int
]
update
_loggedInUserId
(
Rename
nId
newName
)
=
do
update
_loggedInUserId
(
Rename
nId
newName
)
=
do
ret
<-
rename_db_update
nId
newName
ret
<-
rename_db_update
nId
newName
mpId
<-
getParentId
nId
mpId
<-
getParentId
nId
...
@@ -94,12 +94,12 @@ update loggedInUserId (Move sourceId targetId) = do
...
@@ -94,12 +94,12 @@ update loggedInUserId (Move sourceId targetId) = do
pure
ids
pure
ids
publish
::
HasNodeError
err
=>
UserId
->
NodeId
->
NodePublishPolicy
->
Cmd
err
Int
publish
::
HasNodeError
err
=>
UserId
->
NodeId
->
NodePublishPolicy
->
DBCmdExtra
err
Int
publish
loggedInUserId
sourceId
policy
=
do
publish
loggedInUserId
sourceId
policy
=
do
targetId
<-
_node_id
<$>
getUserRootPublicNode
loggedInUserId
targetId
<-
_node_id
<$>
getUserRootPublicNode
loggedInUserId
publish_node
(
SourceId
sourceId
)
(
TargetId
targetId
)
policy
publish_node
(
SourceId
sourceId
)
(
TargetId
targetId
)
policy
publish_node
::
HasNodeError
err
=>
SourceId
->
TargetId
->
NodePublishPolicy
->
Cmd
err
Int
publish_node
::
HasNodeError
err
=>
SourceId
->
TargetId
->
NodePublishPolicy
->
DBCmdExtra
err
Int
publish_node
(
SourceId
sourceId
)
(
TargetId
targetId
)
policy
=
do
publish_node
(
SourceId
sourceId
)
(
TargetId
targetId
)
policy
=
do
sourceNode
<-
getNode
sourceId
sourceNode
<-
getNode
sourceId
targetNode
<-
getNode
targetId
targetNode
<-
getNode
targetId
...
@@ -121,7 +121,7 @@ publish_node (SourceId sourceId) (TargetId targetId) policy = do
...
@@ -121,7 +121,7 @@ publish_node (SourceId sourceId) (TargetId targetId) policy = do
-- Issue #400, for now we support only publishing corpus nodes
-- Issue #400, for now we support only publishing corpus nodes
check_publish_source_type_allowed
::
HasNodeError
err
=>
SourceId
->
TargetId
->
NodeType
->
Cmd
err
()
check_publish_source_type_allowed
::
HasNodeError
err
=>
SourceId
->
TargetId
->
NodeType
->
DBCmdExtra
err
()
check_publish_source_type_allowed
(
SourceId
nId
)
(
TargetId
tId
)
=
\
case
check_publish_source_type_allowed
(
SourceId
nId
)
(
TargetId
tId
)
=
\
case
NodeCorpus
->
pure
()
NodeCorpus
->
pure
()
NodeCorpusV3
->
pure
()
NodeCorpusV3
->
pure
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment