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
10
Merge Requests
10
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
4764c28a
Commit
4764c28a
authored
Feb 21, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PAR] fib route
parent
c1c5d301
Pipeline
#750
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
API.hs
src/Gargantext/API.hs
+18
-0
Prelude.hs
src/Gargantext/Prelude.hs
+8
-0
No files found.
src/Gargantext/API.hs
View file @
4764c28a
...
...
@@ -241,6 +241,15 @@ type GargAdminAPI
:<|>
"nodes"
:>
Summary
"Nodes endpoint"
:>
ReqBody
'[
J
SON
]
[
NodeId
]
:>
NodesAPI
----------------------------------------
-- For Tests
type
FibAPI
=
Get
'[
J
SON
]
Int
fibAPI
::
Int
->
GargServer
FibAPI
fibAPI
n
=
pure
(
fib
n
)
----------------------------------------
type
GargPrivateAPI'
=
GargAdminAPI
...
...
@@ -306,6 +315,9 @@ type GargPrivateAPI' =
-- :<|> New.AddWithFile
-- :<|> "scraper" :> WithCallbacks ScraperAPI
-- :<|> "new" :> New.Api
:<|>
"fib"
:>
Summary
"Fib test"
:>
Capture
"x"
Int
:>
FibAPI
-- Get '[JSON] Int
-- /mv/<id>/<id>
-- /merge/<id>/<id>
...
...
@@ -361,6 +373,7 @@ serverGargAdminAPI
=
roots
:<|>
nodesAPI
serverPrivateGargAPI'
::
AuthenticatedUser
->
GargServer
GargPrivateAPI'
serverPrivateGargAPI'
(
AuthenticatedUser
(
NodeId
uid
))
=
serverGargAdminAPI
...
...
@@ -393,6 +406,8 @@ serverPrivateGargAPI' (AuthenticatedUser (NodeId uid))
:<|>
addAnnuaireWithForm
-- :<|> New.api uid -- TODO-SECURITY
-- :<|> New.info uid -- TODO-SECURITY
:<|>
fibAPI
{-
addUpload :: GargServer New.Upload
...
...
@@ -511,3 +526,6 @@ startGargantextMock port = do
application <- makeMockApp . MockEnv $ FireWall False
run port application
-}
src/Gargantext/Prelude.hs
View file @
4764c28a
...
...
@@ -296,4 +296,12 @@ movingAverage steps xs = map mean $ chunkAlong steps 1 xs
ma
::
[
Double
]
->
[
Double
]
ma
=
movingAverage
3
-----------------------------------------------------------------------
fib
::
Int
->
Int
fib
0
=
0
fib
1
=
1
fib
n
=
fib
(
n
-
1
)
+
fib
(
n
-
2
)
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