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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Christian Merten
haskell-gargantext
Commits
98e0a7ba
Commit
98e0a7ba
authored
Feb 09, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] mkNodeUser.
parent
acb9e74c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Node.hs
src/Gargantext/Database/Schema/Node.hs
+7
-6
No files found.
src/Gargantext/Database/Schema/Node.hs
View file @
98e0a7ba
...
...
@@ -510,13 +510,14 @@ childWith _ _ (Node' _ _ _ _) = panic "This NodeType can not be a c
type
Name
=
Text
-- | TODO mk all others nodes
mkNodeWithParent
::
HasNodeError
err
=>
NodeType
->
Maybe
ParentId
->
UserId
->
Name
->
Cmd
err
[
NodeId
]
mkNodeWithParent
NodeUser
(
Just
_
)
_
_
=
nodeError
UserNoParent
--mkNodeWithParent _ Nothing _ _ = nodeError HasParent
mkNodeWithParent
nt
pId
uId
name
=
insertNodesWithParentR
pId
[
node
nt
name
hd
pId
uId
]
where
hd
=
HyperdataUser
.
Just
.
pack
$
show
EN
mkNodeWithParent
NodeUser
(
Just
_
)
_
_
=
nodeError
UserNoParent
mkNodeWithParent
NodeUser
Nothing
uId
name
=
insertNodesWithParentR
Nothing
[
node
NodeUser
name
hd
Nothing
uId
]
where
hd
=
HyperdataUser
.
Just
.
pack
$
show
EN
mkNodeWithParent
_
Nothing
_
_
=
nodeError
HasParent
mkRoot
::
HasNodeError
err
=>
Username
->
UserId
->
Cmd
err
[
RootId
]
mkRoot
uname
uId
=
case
uId
>
0
of
...
...
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