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
8a6eea0e
Verified
Commit
8a6eea0e
authored
May 07, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CLI] simplified routes sorting
Route implements Ord so no need to import Internal stuff
parent
6795382b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
Routes.hs
bin/gargantext-cli/CLI/Server/Routes.hs
+1
-6
No files found.
bin/gargantext-cli/CLI/Server/Routes.hs
View file @
8a6eea0e
...
@@ -19,7 +19,6 @@ import Gargantext.Prelude
...
@@ -19,7 +19,6 @@ import Gargantext.Prelude
import
Options.Applicative
import
Options.Applicative
import
Servant.API
import
Servant.API
import
Servant.API.Routes
import
Servant.API.Routes
import
Servant.API.Routes.Internal.Route
(
routeMethod
,
routePath
)
import
Servant.API.WebSocket
qualified
as
WS
(
WebSocketPending
)
import
Servant.API.WebSocket
qualified
as
WS
(
WebSocketPending
)
import
Servant.Auth
qualified
as
Servant
import
Servant.Auth
qualified
as
Servant
...
@@ -54,10 +53,6 @@ instance HasRoutes Raw where
...
@@ -54,10 +53,6 @@ instance HasRoutes Raw where
routesCLI
::
CLIRoutes
->
IO
()
routesCLI
::
CLIRoutes
->
IO
()
routesCLI
=
\
case
routesCLI
=
\
case
CLIR_list
CLIR_list
->
do
->
traverse_
(
T
.
putStrLn
.
renderRoute
)
.
sort
$
getRoutes
@
(
NamedRoutes
API
)
let
routes
=
getRoutes
@
(
NamedRoutes
API
)
let
cmpFunc
r
=
(
renderPath
(
r
^.
routePath
),
r
^.
routeMethod
)
let
sortedRoutes
=
sortBy
(
\
a
b
->
compare
(
cmpFunc
a
)
(
cmpFunc
b
))
routes
traverse_
(
T
.
putStrLn
.
renderRoute
)
sortedRoutes
(
CLIR_export
filePath
)
(
CLIR_export
filePath
)
->
B
.
writeFile
filePath
.
BL
.
toStrict
$
encodePretty
(
getRoutes
@
(
NamedRoutes
API
))
->
B
.
writeFile
filePath
.
BL
.
toStrict
$
encodePretty
(
getRoutes
@
(
NamedRoutes
API
))
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