Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SASC
sentinel-legacy
Commits
a00812ff
Commit
a00812ff
authored
Jul 02, 2015
by
bow
Browse files
Redirect root to UI docs instead of specs
parent
9f8bbb62
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/it/scala/nl/lumc/sasc/sentinel/api/RootControllerSpec.scala
View file @
a00812ff
...
...
@@ -49,8 +49,8 @@ class RootControllerSpec extends SentinelServletSpec with Mockito {
priorResponse
.
status
mustEqual
301
}
"redirect to /api-
spec
"
in
{
priorResponse
.
header
(
"Location"
)
must
endWith
(
"/api-
spec
"
)
"redirect to /api-
docs
"
in
{
priorResponse
.
header
(
"Location"
)
must
endWith
(
"/api-
docs
"
)
}
"return an empty body"
in
{
...
...
src/main/scala/nl/lumc/sasc/sentinel/api/RootController.scala
View file @
a00812ff
...
...
@@ -36,9 +36,9 @@ class RootController extends ScalatraServlet
response
.
setHeader
(
"Access-Control-Allow-Methods"
,
"GET,HEAD"
)
}
/** Root endpoint, which permanently redirects to our
specific
ation. */
/** Root endpoint, which permanently redirects to our
document
ation. */
get
(
"/"
)
{
contentType
=
formats
(
"json"
)
halt
(
status
=
301
,
headers
=
Map
(
"Location"
->
"/api-
spec
"
))
halt
(
status
=
301
,
headers
=
Map
(
"Location"
->
"/api-
docs
"
))
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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