Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/jerakia/server/rest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,15 @@ def mandatory_params(mandatory, params)
end

get '/v1/lookup/:key' do
mandatory_params(['namespace'], params)

request_opts = {
:key => params['key'],
:namespace => params['namespace'].split(/\//),
}

if params['namespace']
request_opts[:namespace] = params['namespace'].split(/\//),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I'm mistaken, the , at the end is a syntax error?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! Must add basic syntax to the rake task for testing!

end

metadata = params.select { |k,v| k =~ /^metadata_.*/ }
scope_opts = params.select { |k,v| k =~ /^scope_.*/ }

Expand Down