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
195
Issues
195
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
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
gargantext
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
Pipeline
#509
failed with stage
Changes
1
Pipelines
1
Show 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