Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alf Eaton
ink-api
Commits
37525acc
Commit
37525acc
authored
Dec 07, 2017
by
charlie-ablett
Browse files
add root in api and index action
parent
0d07d3f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/api/v1/pages_controller.rb
View file @
37525acc
...
...
@@ -6,6 +6,14 @@ module Api
respond_to
:json
def
index
render
json:
{
data:
{
message:
"INK API works! - To use it, point to /api/"
}
}
end
def
anyone
render
json:
{
data:
{
...
...
config/routes.rb
View file @
37525acc
...
...
@@ -76,6 +76,8 @@ Rails.application.routes.draw do
post
'create_from_process_step'
end
end
root
'pages#anyone'
end
# scope module: :v2, constraints: ApiConstraints.new(version: 2, default: true) do
...
...
@@ -83,5 +85,5 @@ Rails.application.routes.draw do
# end
end
root
'api/v1/pages#
anyone
'
root
'api/v1/pages#
index
'
end
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