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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Julien Moutinho
haskell-gargantext
Commits
1601a27c
Commit
1601a27c
authored
Jan 07, 2023
by
Karen Konou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] [Teams] Members list for autocomplete
parent
444d9e8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
Members.hs
src/Gargantext/API/Members.hs
+18
-0
Routes.hs
src/Gargantext/API/Routes.hs
+6
-0
No files found.
src/Gargantext/API/Members.hs
0 → 100644
View file @
1601a27c
module
Gargantext.API.Members
where
import
Gargantext.Prelude
import
Gargantext.API.Prelude
import
Servant
import
Data.Text
(
Text
)
import
Gargantext.API.Admin.EnvTypes
(
Env
)
import
Gargantext.Core.Types
(
UserId
)
import
Gargantext.Database.Admin.Types.Node
(
NodeType
(
NodeTeam
))
import
Gargantext.Database.Query.Table.Node
(
getNodesIdWithType
)
import
Gargantext.Database.Action.Share
(
membersOf
)
type
MembersAPI
=
Get
'[
J
SON
]
[
Text
]
members
::
UserId
->
ServerT
MembersAPI
(
GargM
Env
GargError
)
members
_
=
do
teamNodeIds
<-
getNodesIdWithType
NodeTeam
map
fst
$
concatMap
membersOf
teamNodeIds
src/Gargantext/API/Routes.hs
View file @
1601a27c
...
...
@@ -33,6 +33,7 @@ import Gargantext.API.Admin.EnvTypes (Env, GargJob(..))
import
Gargantext.API.Admin.FrontEnd
(
FrontEndAPI
)
import
Gargantext.API.Context
import
Gargantext.API.Count
(
CountAPI
,
count
,
Query
)
import
Gargantext.API.Members
(
MembersAPI
,
members
)
import
Gargantext.API.Job
(
jobLogInit
)
import
Gargantext.API.Ngrams
(
TableNgramsApi
,
apiNgramsTableDoc
)
import
Gargantext.API.Node
...
...
@@ -163,6 +164,9 @@ type GargPrivateAPI' =
:>
Capture
"tree_id"
NodeId
:>
TreeAPI
:<|>
"members"
:>
Summary
"Team node members"
:>
MembersAPI
-- :<|> New.Upload
:<|>
New
.
AddWithForm
-- :<|> New.AddWithFile
...
...
@@ -248,6 +252,8 @@ serverPrivateGargAPI' (AuthenticatedUser (NodeId uid))
:<|>
withAccess
(
Proxy
::
Proxy
TreeAPI
)
Proxy
uid
<$>
PathNode
<*>
treeAPI
:<|>
members
uid
-- TODO access
:<|>
addCorpusWithForm
(
RootId
(
NodeId
uid
))
-- :<|> addCorpusWithFile (RootId (NodeId uid))
...
...
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