minor changes
This commit is contained in:
parent
dd7e74950d
commit
5663410c45
|
@ -6,8 +6,8 @@ module Travis::API::V3
|
||||||
def run!
|
def run!
|
||||||
raise LoginRequired unless access_control.logged_in? or access_control.full_access?
|
raise LoginRequired unless access_control.logged_in? or access_control.full_access?
|
||||||
raise InsufficientAccess unless Travis::Features.feature_active?(:cron)
|
raise InsufficientAccess unless Travis::Features.feature_active?(:cron)
|
||||||
raise NotFound unless repository = find(:repository)
|
raise NotFound unless repository = find(:repository)
|
||||||
raise NotFound unless branch = find(:branch, repository)
|
raise NotFound unless branch = find(:branch, repository)
|
||||||
raise Error.new('Invalid value for interval. Interval must be "daily", "weekly" or "monthly"!', status: 422) unless ["daily", "weekly", "monthly"].include?(params["interval"])
|
raise Error.new('Invalid value for interval. Interval must be "daily", "weekly" or "monthly"!', status: 422) unless ["daily", "weekly", "monthly"].include?(params["interval"])
|
||||||
access_control.permissions(repository).create_cron!
|
access_control.permissions(repository).create_cron!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user