summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.rb
diff options
context:
space:
mode:
authorJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2014-01-11 18:40:17 +0100
committerJeroen van Baarsen <jeroenvanbaarsen@gmail.com>2014-01-11 18:40:17 +0100
commitef404d8ea62f277ec40d9a0a82c08d389b07b54e (patch)
treeeaccdbf06fdc9bff2de42a2702d44aa18bcce6bb /lib/api/project_snippets.rb
parent2eb1220f6701442660b090fba66c82f8008ee1f6 (diff)
downloadgitlab-ce-ef404d8ea62f277ec40d9a0a82c08d389b07b54e.tar.gz
Dropped expiration date from the snippet API
Diffstat (limited to 'lib/api/project_snippets.rb')
-rw-r--r--lib/api/project_snippets.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index bee6544ea3d..8e09fff6843 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -41,7 +41,6 @@ module API
# id (required) - The ID of a project
# title (required) - The title of a snippet
# file_name (required) - The name of a snippet file
- # lifetime (optional) - The expiration date of a snippet
# code (required) - The content of a snippet
# Example Request:
# POST /projects/:id/snippets
@@ -50,7 +49,6 @@ module API
required_attributes! [:title, :file_name, :code]
attrs = attributes_for_keys [:title, :file_name]
- attrs[:expires_at] = params[:lifetime] if params[:lifetime].present?
attrs[:content] = params[:code] if params[:code].present?
@snippet = user_project.snippets.new attrs
@snippet.author = current_user
@@ -69,7 +67,6 @@ module API
# snippet_id (required) - The ID of a project snippet
# title (optional) - The title of a snippet
# file_name (optional) - The name of a snippet file
- # lifetime (optional) - The expiration date of a snippet
# code (optional) - The content of a snippet
# Example Request:
# PUT /projects/:id/snippets/:snippet_id
@@ -78,7 +75,6 @@ module API
authorize! :modify_project_snippet, @snippet
attrs = attributes_for_keys [:title, :file_name]
- attrs[:expires_at] = params[:lifetime] if params[:lifetime].present?
attrs[:content] = params[:code] if params[:code].present?
if @snippet.update_attributes attrs