Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wattsworth
/
lumen-api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
030b7723
authored
Sep 19, 2018
by
John Doe
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
tweaks for local execution
parent
fa392969
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
app/controllers/interfaces_controller.rb
config/environments/local.rb
app/controllers/interfaces_controller.rb
View file @
030b7723
...
...
@@ -31,7 +31,7 @@ class InterfacesController < ActionController::Base
#everything else is proxied
def
get
path
=
request
.
fullpath
.
sub
(
"/interfaces/
#{
@joule_module
.
id
}
"
,
""
)
path
=
request
.
fullpath
.
sub
(
"/
api/
interfaces/
#{
@joule_module
.
id
}
"
,
""
)
proxied_response
=
@node_adapter
.
module_interface
(
@joule_module
,
path
)
render
plain:
proxied_response
.
body
...
...
@@ -44,7 +44,7 @@ class InterfacesController < ActionController::Base
end
def
post
path
=
request
.
fullpath
.
sub
(
"/interfaces/
#{
@joule_module
.
id
}
"
,
""
)
path
=
request
.
fullpath
.
sub
(
"/
api/
interfaces/
#{
@joule_module
.
id
}
"
,
""
)
proxied_response
=
@node_adapter
.
module_post_interface
(
@joule_module
,
path
)
render
plain:
proxied_response
.
body
...
...
config/environments/local.rb
View file @
030b7723
...
...
@@ -86,7 +86,8 @@ Rails.application.configure do
config
.
active_record
.
dump_schema_after_migration
=
false
config
.
interface_url_template
=
lambda
do
|
id
|
return
"http://
#{
id
}
.interfaces.wattsworth.local"
#return "http://#{id}.interfaces.wattsworth.local"
return
"http://wattsworth.local/api/interfaces/
#{
id
}
"
end
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