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
120
Issues
120
List
Board
Labels
Milestones
Merge Requests
7
Merge Requests
7
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
3eb58680
Commit
3eb58680
authored
Nov 14, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/452-dev-teams-security' into dev-merge
parents
b9db02f4
27a5fcf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
TreeFirstLevel.hs
src/Gargantext/API/GraphQL/TreeFirstLevel.hs
+11
-7
No files found.
src/Gargantext/API/GraphQL/TreeFirstLevel.hs
View file @
3eb58680
...
...
@@ -78,13 +78,17 @@ childrenToTreeNodes (TreeN {_tn_node}, rId) = toTreeNode (Just rId) _tn_node
resolveParent
::
(
HasConnectionPool
env
,
HasConfig
env
,
HasMail
env
)
=>
Maybe
NodeId
->
GqlM
e
env
(
Maybe
TreeNode
)
resolveParent
(
Just
pId
)
=
do
node
<-
lift
$
getNode
pId
pure
$
Just
$
nodeToTreeNode
node
pure
$
nodeToTreeNode
node
resolveParent
Nothing
=
pure
Nothing
nodeToTreeNode
::
NN
.
Node
json
->
TreeNode
nodeToTreeNode
N
.
Node
{
..
}
=
TreeNode
{
id
=
NN
.
unNodeId
_node_id
,
name
=
_node_name
,
node_type
=
fromNodeTypeId
_node_typename
,
parent_id
=
NN
.
unNodeId
<$>
_node_parent_id
}
nodeToTreeNode
::
NN
.
Node
json
->
Maybe
TreeNode
nodeToTreeNode
N
.
Node
{
..
}
=
if
(
fromNodeTypeId
_node_typename
/=
NN
.
NodeFolderShared
)
&&
(
fromNodeTypeId
_node_typename
/=
NN
.
NodeTeam
)
then
Just
TreeNode
{
id
=
NN
.
unNodeId
_node_id
,
name
=
_node_name
,
node_type
=
fromNodeTypeId
_node_typename
,
parent_id
=
NN
.
unNodeId
<$>
_node_parent_id
}
else
Nothing
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