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
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
d91758bc
Verified
Commit
d91758bc
authored
Sep 01, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[search] remove SearchResultErr/SearchQueryErr
parent
c2a50fcf
Pipeline
#1754
passed with stage
in 32 minutes and 18 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
Search.hs
src/Gargantext/API/Search.hs
+0
-9
No files found.
src/Gargantext/API/Search.hs
View file @
d91758bc
...
...
@@ -66,7 +66,6 @@ api nId (SearchQuery q SearchContact) o l order = do
<$>
SearchResultContact
<$>
map
(
toRow
aId
)
<$>
searchInCorpusWithContacts
nId
aId
q
o
l
order
api
_
_
_
_
_
=
panic
"[G.A.Search.api] undefined"
-----------------------------------------------------------------------
-----------------------------------------------------------------------
...
...
@@ -74,15 +73,12 @@ api _ _ _ _ _ = panic "[G.A.Search.api] undefined"
-----------------------------------------------------------------------
data
SearchType
=
SearchDoc
|
SearchContact
deriving
(
Generic
)
instance
FromJSON
SearchType
where
parseJSON
=
genericParseJSON
(
defaultOptions
{
sumEncoding
=
ObjectWithSingleField
})
instance
ToJSON
SearchType
where
toJSON
=
genericToJSON
(
defaultOptions
{
sumEncoding
=
ObjectWithSingleField
})
instance
ToSchema
SearchType
instance
Arbitrary
SearchType
where
arbitrary
=
elements
[
SearchDoc
,
SearchContact
]
...
...
@@ -92,17 +88,13 @@ data SearchQuery =
SearchQuery
{
query
::
!
[
Text
]
,
expected
::
!
SearchType
}
|
SearchQueryErr
!
Text
deriving
(
Generic
)
instance
FromJSON
SearchQuery
where
parseJSON
=
genericParseJSON
(
defaultOptions
{
sumEncoding
=
ObjectWithSingleField
})
instance
ToJSON
SearchQuery
where
toJSON
=
genericToJSON
(
defaultOptions
{
sumEncoding
=
ObjectWithSingleField
})
instance
ToSchema
SearchQuery
{-
where
...
...
@@ -115,7 +107,6 @@ instance Arbitrary SearchQuery where
-----------------------------------------------------------------------
data
SearchResult
=
SearchResult
{
result
::
!
SearchResultTypes
}
|
SearchResultErr
!
Text
deriving
(
Generic
)
instance
FromJSON
SearchResult
...
...
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