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
157
Issues
157
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
88944266
Commit
88944266
authored
Mar 02, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[COUNT] unprefix.
parent
e9d7a207
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Count.hs
src/Gargantext/API/Count.hs
+7
-5
No files found.
src/Gargantext/API/Count.hs
View file @
88944266
...
...
@@ -21,22 +21,25 @@ Count API part of Gargantext.
module
Gargantext.API.Count
where
import
Gargantext.Prelude
import
GHC.Generics
(
Generic
)
import
Prelude
(
Bounded
,
Enum
,
minBound
,
maxBound
)
import
Data.Eq
(
Eq
())
import
Data.Text
(
Text
,
pack
)
import
Data.Aeson
hiding
(
Error
)
import
Data.Aeson.TH
(
deriveJSON
)
import
Data.Eq
(
Eq
())
import
Data.List
(
repeat
,
permutations
)
import
Data.Swagger
import
Data.Text
(
Text
,
pack
)
import
Servant
import
Test.QuickCheck.Arbitrary
import
Test.QuickCheck
(
elements
)
-- import Control.Applicative ((<*>))
import
Gargantext.Prelude
import
Gargantext.Utils.Prefix
(
unPrefix
)
-----------------------------------------------------------------------
type
CountAPI
=
Post
'[
J
SON
]
Counts
...
...
@@ -142,8 +145,7 @@ data Count = Count { count_name :: Scraper
}
deriving
(
Eq
,
Show
,
Generic
)
instance
FromJSON
Count
instance
ToJSON
Count
$
(
deriveJSON
(
unPrefix
"count_"
)
''
C
ount
)
instance
ToSchema
Count
--instance Arbitrary Count where
...
...
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