
This adds /repo/{repository.id}/settings endpoints for reading and updating repo settings. Main points: 1. Sets up Settings as a first class resource instead of as an attribute of Repository 2. Adds new meta-programmed method to Query for accessing all prefixed params as a hash.
10 lines
273 B
Ruby
10 lines
273 B
Ruby
module Travis::API::V3
|
|
class Services::Settings::Find < Service
|
|
def run!
|
|
raise LoginRequired unless access_control.logged_in? or access_control.full_access?
|
|
raise NotFound unless repo = find(:repository)
|
|
find(:settings, repo)
|
|
end
|
|
end
|
|
end
|