Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-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
Grégoire Locqueville
purescript-gargantext
Commits
2ed789a8
Commit
2ed789a8
authored
Sep 08, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[share] fix JSON serialization of ShareNodeParams
parent
d2807c50
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Share.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
+7
-2
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
View file @
2ed789a8
...
@@ -22,6 +22,7 @@ import Gargantext.Routes as GR
...
@@ -22,6 +22,7 @@ import Gargantext.Routes as GR
import Gargantext.Sessions (Session, post)
import Gargantext.Sessions (Session, post)
import Gargantext.Types (ID)
import Gargantext.Types (ID)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Utils.SimpleJSON as GUSJ
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
here :: R2.Here
here :: R2.Here
...
@@ -41,8 +42,12 @@ data ShareNodeParams = ShareTeamParams { username :: String }
...
@@ -41,8 +42,12 @@ data ShareNodeParams = ShareTeamParams { username :: String }
| SharePublicParams { node_id :: Int }
| SharePublicParams { node_id :: Int }
derive instance Eq ShareNodeParams
derive instance Eq ShareNodeParams
derive instance Generic ShareNodeParams _
derive instance Generic ShareNodeParams _
instance JSON.ReadForeign ShareNodeParams where readImpl = JSONG.untaggedSumRep
instance JSON.ReadForeign ShareNodeParams where readImpl = GUSJ.taggedSumRep
instance JSON.WriteForeign ShareNodeParams where writeImpl = JSON.writeImpl <<< show
instance JSON.WriteForeign ShareNodeParams where
writeImpl (ShareTeamParams { username }) = JSON.writeImpl { "type": "ShareTeamParams"
, username }
writeImpl (SharePublicParams { node_id }) = JSON.writeImpl { "type": "SharePublicParams"
, node_id }
instance Show ShareNodeParams where show = genericShow
instance Show ShareNodeParams where show = genericShow
------------------------------------------------------------------------
------------------------------------------------------------------------
...
...
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