Skip to content

Commit

Permalink
added access to archive/unarchive/close/reopen actions in API
Browse files Browse the repository at this point in the history
  • Loading branch information
mareklipka committed Aug 4, 2016
1 parent 494f5e9 commit 1a31b30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/controllers/imperator_api/v1/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class ProjectsController < ::ProjectsController
controller.send :expire_action, :controller => '/welcome', :action => 'robots'
end
end
accept_api_auth :index, :show, :create, :update, :destroy, :copy_source, :copy
accept_api_auth :index, :show, :create, :update, :destroy, :copy_source,
:copy, :archive, :unarchive, :close, :reopen
include Concerns::ErrorHandling
include Concerns::AccessControl

Expand Down
6 changes: 5 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
member do
get 'copy_source'
post 'copy'
post 'archive'
post 'unarchive'
post 'close'
post 'reopen'
end
end

get 'robots.txt', to: 'welcome#robots'

resources :time_entries, controller: 'timelog', only: [:create, :update, :destroy] do
collection do
collection do
post 'bulk_update'
end
end
Expand Down

0 comments on commit 1a31b30

Please sign in to comment.