Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
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
Przemyslaw Kaminski
haskell-gargantext
Commits
ce9814b9
Commit
ce9814b9
authored
Jan 28, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Hyperdata] Folder == Corpus for now.
parent
5722575b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
+10
-14
Node.hs
src/Gargantext/Database/Schema/Node.hs
+8
-8
Node.hs
src/Gargantext/Database/Types/Node.hs
+2
-6
No files found.
src/Gargantext/Database/Schema/Node.hs
View file @
ce9814b9
...
...
@@ -401,10 +401,10 @@ nodeUserW maybeName maybeHyperdata = node NodeUser name user Nothing
name
=
maybe
"User"
identity
maybeName
user
=
maybe
defaultUser
identity
maybeHyperdata
------------------------------------------------------------------------
defaultFolder
::
Hyperdata
Folder
defaultFolder
=
HyperdataFolder
(
Just
"Markdown Description"
)
defaultFolder
::
Hyperdata
Corpus
defaultFolder
=
defaultCorpus
nodeFolderW
::
Maybe
Name
->
Maybe
Hyperdata
Folder
->
ParentId
->
UserId
->
NodeWrite
nodeFolderW
::
Maybe
Name
->
Maybe
Hyperdata
Corpus
->
ParentId
->
UserId
->
NodeWrite
nodeFolderW
maybeName
maybeFolder
pid
=
node
NodeFolder
name
folder
(
Just
pid
)
where
name
=
maybe
"Folder"
identity
maybeName
...
...
@@ -626,27 +626,27 @@ mkNodeWithParent _ Nothing _ _ = nodeError HasParent
mkNodeWithParent
NodeFolder
(
Just
i
)
uId
name
=
insertNodesWithParentR
(
Just
i
)
[
node
NodeFolder
name
hd
Nothing
uId
]
where
hd
=
HyperdataFolder
.
Just
.
pack
$
show
EN
hd
=
defaultFolder
mkNodeWithParent
NodeFolderPrivate
(
Just
i
)
uId
_
=
insertNodesWithParentR
(
Just
i
)
[
node
NodeFolderPrivate
"Private"
hd
Nothing
uId
]
where
hd
=
HyperdataFolder
.
Just
.
pack
$
show
EN
hd
=
defaultFolder
mkNodeWithParent
NodeFolderShared
(
Just
i
)
uId
_
=
insertNodesWithParentR
(
Just
i
)
[
node
NodeFolderShared
"Shared"
hd
Nothing
uId
]
where
hd
=
HyperdataFolder
.
Just
.
pack
$
show
EN
hd
=
defaultFolder
mkNodeWithParent
NodeFolderPublic
(
Just
i
)
uId
_
=
insertNodesWithParentR
(
Just
i
)
[
node
NodeFolderPublic
"Public"
hd
Nothing
uId
]
where
hd
=
HyperdataFolder
.
Just
.
pack
$
show
EN
hd
=
defaultFolder
mkNodeWithParent
NodeTeam
(
Just
i
)
uId
_
=
insertNodesWithParentR
(
Just
i
)
[
node
NodeTeam
"Team"
hd
Nothing
uId
]
where
hd
=
HyperdataFolder
.
Just
.
pack
$
show
EN
hd
=
defaultFolder
------------------------------------------------------------------------
...
...
src/Gargantext/Database/Types/Node.hs
View file @
ce9814b9
...
...
@@ -299,13 +299,9 @@ $(deriveJSON (unPrefix "hyperdataUser_") ''HyperdataUser)
instance
Hyperdata
HyperdataUser
------------------------------------------------------------------------
data
HyperdataFolder
=
HyperdataFolder
{
hyperdataFolder_desc
::
!
(
Maybe
Text
)
}
deriving
(
Show
,
Generic
)
$
(
deriveJSON
(
unPrefix
"hyperdataFolder_"
)
''
H
yperdataFolder
)
instance
Hyperdata
HyperdataFolder
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
data
CodeType
=
JSON
|
Markdown
|
Haskell
deriving
(
Generic
)
instance
ToJSON
CodeType
...
...
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