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
17e8454e
Commit
17e8454e
authored
Jul 02, 2019
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PHYLO] Api backend render svg properly now (without escaping).
parent
ff53e1bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
API.hs
src/Gargantext/Viz/Phylo/API.hs
+9
-4
No files found.
src/Gargantext/Viz/Phylo/API.hs
View file @
17e8454e
...
...
@@ -23,9 +23,10 @@ Portability : POSIX
module
Gargantext.Viz.Phylo.API
where
import
Data.String.Conversions
--import Control.Monad.Reader (ask)
import
qualified
Data.ByteString
as
DB
import
qualified
Data.ByteString.Lazy
.Char8
as
DBL
(
pack
)
import
qualified
Data.ByteString.Lazy
as
DBL
import
Data.Text
(
Text
)
import
Data.Map
(
empty
)
import
Data.Swagger
...
...
@@ -63,7 +64,10 @@ newtype SVG = SVG DB.ByteString
instance
ToSchema
SVG
where
declareNamedSchema
=
undefined
declareNamedSchema
=
undefined
{-genericDeclareNamedSchema
defaultSchemaOptions {fieldLabelModifier = \fieldLabel -> drop 3 fieldLabel}
-}
-- undefined
--genericDeclareNamedSchemaUnrestricted (swaggerOptions "")
instance
Show
SVG
where
...
...
@@ -75,8 +79,9 @@ instance Accept SVG where
instance
Show
a
=>
MimeRender
PlainText
a
where
mimeRender
_
val
=
cs
(
""
<>
show
val
)
instance
Show
a
=>
MimeRender
SVG
a
where
mimeRender
_
val
=
DBL
.
pack
$
(
"SVG"
<>
show
val
)
instance
MimeRender
SVG
SVG
where
mimeRender
_
(
SVG
s
)
=
DBL
.
fromStrict
s
------------------------------------------------------------------------
type
GetPhylo
=
QueryParam
"listId"
ListId
...
...
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