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
148
Issues
148
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
11e23878
Commit
11e23878
authored
Nov 27, 2023
by
Alfredo Di Napoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace panic in getPhylo
parent
0460c11e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
API.hs
src/Gargantext/Core/Viz/Phylo/API.hs
+3
-2
No files found.
src/Gargantext/Core/Viz/Phylo/API.hs
View file @
11e23878
...
...
@@ -42,6 +42,7 @@ import Servant
import
Test.QuickCheck
(
elements
)
import
Test.QuickCheck.Arbitrary
(
Arbitrary
,
arbitrary
)
import
Web.HttpApiData
(
readTextData
)
import
Gargantext.Database.Query.Table.Node.Error
------------------------------------------------------------------------
type
PhyloAPI
=
Summary
"Phylo API"
...
...
@@ -125,8 +126,8 @@ type GetPhylo = QueryParam "listId" ListId
-- TODO fix parameters to default config that should be in Node
getPhylo
::
PhyloId
->
GargServer
GetPhylo
getPhylo
phyloId
lId
_level
_minSizeBranch
=
do
corpusId
<-
fromMaybe
(
panic
$
"[G.C.V.Phylo.API] no parent for NodeId "
<>
(
show
phyloId
))
<$>
getClosestParentIdByType
phyloId
NodeCorpus
corpusId
<-
maybe
(
nodeLookupError
$
NodeParentDoesNotExist
phyloId
)
pure
=<<
getClosestParentIdByType
phyloId
NodeCorpus
listId
<-
case
lId
of
Nothing
->
defaultList
corpusId
Just
ld
->
pure
ld
...
...
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