diff options
author | Nick Thomas <nick@gitlab.com> | 2018-08-06 13:51:37 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-08-06 13:51:37 +0300 |
commit | f6e6faee68e16fde00e44caa9b8c0c527aa79689 (patch) | |
tree | a5a357c4e596c27a96d4a12e2b83f982939588ca /lib | |
parent | bc1f851fdfaf9cc2bba5b67fd762e8802023bf5c (diff) | |
parent | 79d90cb6bd99b7af572c65af89597c2e55217aea (diff) |
Merge branch 'jr-archive-hook' into 'master'
Trigger `project_update` system hook when archiving projects
See merge request gitlab-org/gitlab-ce!20995
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/projects.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 7adde79d6c3..5738bf220c6 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -321,7 +321,7 @@ module API post ':id/archive' do authorize!(:archive_project, user_project) - user_project.archive! + ::Projects::UpdateService.new(user_project, current_user, archived: true).execute present user_project, with: Entities::Project end @@ -332,7 +332,7 @@ module API post ':id/unarchive' do authorize!(:archive_project, user_project) - user_project.unarchive! + ::Projects::UpdateService.new(@project, current_user, archived: false).execute present user_project, with: Entities::Project end |