summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-04-13 15:05:21 +0000
committerRémy Coutable <remy@rymai.me>2016-04-13 15:05:21 +0000
commit94e130cec30a8cfa6687d254e1cabce568a22634 (patch)
treef92966b9197edc7360c94de457341c3f086e7a42 /lib/api/helpers.rb
parenteebd7533ea780dade5e953b05c83c7b87f4bbf6f (diff)
parent54231aa4e036179d035ddd3641bc15a5b31883f2 (diff)
downloadgitlab-ce-94e130cec30a8cfa6687d254e1cabce568a22634.tar.gz
Merge branch 'api-star-project' into 'master'
API: Star and unstar a project Add two new endpoints `POST /projects/:id/star` and `POST /projects/:id/unstar` to star and unstar a project. * Closes #12739 See merge request !3578
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 96af7d7675c..5bbf721321d 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -240,6 +240,10 @@ module API
render_api_error!('413 Request Entity Too Large', 413)
end
+ def not_modified!
+ render_api_error!('304 Not Modified', 304)
+ end
+
def render_validation_error!(model)
if model.errors.any?
render_api_error!(model.errors.messages || '400 Bad Request', 400)