
This adds API V3 endpoints for querying, creating, modifying and
deleting environment variables.
It has no concept of encryption yet and should be considered a work in
progress.
We should also talk about the slightly off-track approach in the
EnvVars::Create service – maybe there's a way to standardise the
querying and rendering for post requests?
☕
13 lines
352 B
Ruby
13 lines
352 B
Ruby
module Travis::API::V3
|
|
class Services::EnvVar::Delete < Service
|
|
params :id, prefix: :repository
|
|
params :id, prefix: :env_var
|
|
|
|
def run!
|
|
raise LoginRequired unless access_control.logged_in? or access_control.full_access?
|
|
raise NotFound unless repository = find(:repository)
|
|
query.delete(repository)
|
|
end
|
|
end
|
|
end
|