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
Christian Merten
haskell-gargantext
Commits
28581725
Verified
Commit
28581725
authored
Apr 25, 2024
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev-flake-merge-0.0.7.1
parents
d65762f6
ca1aa195
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
2 deletions
+46
-2
CHANGELOG.md
CHANGELOG.md
+5
-1
gargantext.cabal
gargantext.cabal
+2
-1
ShareURL.hs
src/Gargantext/API/Node/ShareURL.hs
+36
-0
Routes.hs
src/Gargantext/API/Routes.hs
+3
-0
No files found.
CHANGELOG.md
View file @
28581725
## Version 0.0.7.1 [RELEASE CANDIDATE 007]
## Version 0.0.7.1.1
*
[
FRONT
][
FEAT
][
[Tree search
]
Add possibility to share a node URL (without the username), that will redirect to the right instance and node (#548)](https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/548)
## Version 0.0.7.1
*
[
FRONT
][
FIX
][
Fix breadcrumbs (#648)
](
https://gitlab.iscpif.fr/gargantext/purescript-gargantext/issues/648
)
...
...
gargantext.cabal
View file @
28581725
...
...
@@ -5,7 +5,7 @@ cabal-version: 3.4
-- see: https://github.com/sol/hpack
name: gargantext
version: 0.0.7.1
version: 0.0.7.1
.1
synopsis: Search, map, share
description: Please see README.md
category: Data
...
...
@@ -133,6 +133,7 @@ library
Gargantext.API.Node.Corpus.Update
Gargantext.API.Node.File
Gargantext.API.Node.Share
Gargantext.API.Node.ShareURL
Gargantext.API.Node.Update
Gargantext.API.Prelude
Gargantext.API.Routes
...
...
src/Gargantext/API/Node/ShareURL.hs
0 → 100644
View file @
28581725
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
module
Gargantext.API.Node.ShareURL
where
import
Data.Text
import
Gargantext.Prelude
import
Gargantext.API.Prelude
import
Servant
import
Gargantext.Core.Types
(
NodeType
,
NodeId
,
unNodeId
)
import
Gargantext.Database.Prelude
(
HasConfig
(
hasConfig
),
CmdCommon
)
import
Control.Lens.Getter
(
view
)
import
Gargantext.Prelude.Config
(
gc_url
)
import
Gargantext.API.Admin.EnvTypes
(
Env
)
import
Gargantext.API.Errors
(
BackendInternalError
)
type
API
=
Summary
"Fetch URL for sharing a node"
:>
QueryParam
"type"
NodeType
:>
QueryParam
"id"
NodeId
:>
Get
'[
J
SON
]
Text
api
::
ServerT
API
(
GargM
Env
BackendInternalError
)
api
=
getUrl
getUrl
::
(
CmdCommon
env
)
=>
Maybe
NodeType
->
Maybe
NodeId
->
GargM
env
BackendInternalError
Text
getUrl
nt
id
=
do
-- TODO add check that the node is able to be shared (in a shared folder)
case
nt
of
Nothing
->
pure
"Invalid node Type"
Just
t
->
case
id
of
Nothing
->
pure
"Invalid node ID"
Just
i
->
do
url
<-
view
$
hasConfig
.
gc_url
pure
$
url
<>
"/#/share/"
<>
show
t
<>
"/"
<>
show
(
unNodeId
i
)
src/Gargantext/API/Routes.hs
View file @
28581725
...
...
@@ -43,6 +43,7 @@ import Gargantext.API.Node.Corpus.Export.Types qualified as CorpusExport
import
Gargantext.API.Node.Corpus.New
qualified
as
New
import
Gargantext.API.Node.Document.Export
qualified
as
DocumentExport
import
Gargantext.API.Node.Document.Export.Types
qualified
as
DocumentExport
import
Gargantext.API.Node.ShareURL
qualified
as
ShareURL
import
Gargantext.API.Prelude
import
Gargantext.API.Public
qualified
as
Public
import
Gargantext.Core.Types.Individu
(
User
(
..
))
...
...
@@ -222,6 +223,7 @@ type GargPrivateAPI' =
:<|>
List
.
GETAPI
:<|>
List
.
JSONAPI
:<|>
List
.
CSVAPI
:<|>
"shareurl"
:>
ShareURL
.
API
{-
:<|> "wait" :> Summary "Wait test"
:> Capture "x" Int
...
...
@@ -305,6 +307,7 @@ serverPrivateGargAPI' authenticatedUser@(AuthenticatedUser userNodeId userId)
:<|>
List
.
getApi
:<|>
List
.
jsonApi
:<|>
List
.
csvApi
:<|>
ShareURL
.
api
-- :<|> waitAPI
...
...
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