summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 14:24:54 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-06-13 14:24:54 +0300
commit1355ede49d02e2a7b1715a3ed6bd7389bfedf6bc (patch)
treed1530d3685f4d934f5224fc6cde9305b736c0c71 /lib/api
parenta5cbb4cb82a6911b5c1de117ae6ed4cbf667a679 (diff)
downloadgitlab-ce-1355ede49d02e2a7b1715a3ed6bd7389bfedf6bc.tar.gz
Wipe wall notes feature
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/entities.rb2
-rw-r--r--lib/api/notes.rb49
-rw-r--r--lib/api/projects.rb4
3 files changed, 1 insertions, 54 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 6bad6c74bca..f15fe185ae0 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -48,7 +48,7 @@ module API
expose :owner, using: Entities::UserBasic, unless: ->(project, options) { project.group }
expose :name, :name_with_namespace
expose :path, :path_with_namespace
- expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :snippets_enabled, :created_at, :last_activity_at
+ expose :issues_enabled, :merge_requests_enabled, :wiki_enabled, :snippets_enabled, :created_at, :last_activity_at
expose :namespace
expose :forked_from_project, using: Entities::ForkedFromProject, :if => lambda{ | project, options | project.forked? }
end
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index cb2bc764476..413faf0cf2d 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -6,55 +6,6 @@ module API
NOTEABLE_TYPES = [Issue, MergeRequest, Snippet]
resource :projects do
- # Get a list of project wall notes
- #
- # Parameters:
- # id (required) - The ID of a project
- # Example Request:
- # GET /projects/:id/notes
- get ":id/notes" do
- @notes = user_project.notes.common
-
- # Get recent notes if recent = true
- @notes = @notes.order('id DESC') if params[:recent]
-
- present paginate(@notes), with: Entities::Note
- end
-
- # Get a single project wall note
- #
- # Parameters:
- # id (required) - The ID of a project
- # note_id (required) - The ID of a note
- # Example Request:
- # GET /projects/:id/notes/:note_id
- get ":id/notes/:note_id" do
- @note = user_project.notes.common.find(params[:note_id])
- present @note, with: Entities::Note
- end
-
- # Create a new project wall note
- #
- # Parameters:
- # id (required) - The ID of a project
- # body (required) - The content of a note
- # Example Request:
- # POST /projects/:id/notes
- post ":id/notes" do
- required_attributes! [:body]
-
- @note = user_project.notes.new(note: params[:body])
- @note.author = current_user
-
- if @note.save
- present @note, with: Entities::Note
- else
- # :note is exposed as :body, but :note is set on error
- bad_request!(:note) if @note.errors[:note].any?
- not_found!
- end
- end
-
NOTEABLE_TYPES.each do |noteable_type|
noteables_str = noteable_type.to_s.underscore.pluralize
noteable_id_str = "#{noteable_type.to_s.underscore}_id"
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 9d290c75ba9..9a7f22b536f 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -71,7 +71,6 @@ module API
# name (required) - name for new project
# description (optional) - short project description
# issues_enabled (optional)
- # wall_enabled (optional)
# merge_requests_enabled (optional)
# wiki_enabled (optional)
# snippets_enabled (optional)
@@ -86,7 +85,6 @@ module API
:path,
:description,
:issues_enabled,
- :wall_enabled,
:merge_requests_enabled,
:wiki_enabled,
:snippets_enabled,
@@ -114,7 +112,6 @@ module API
# description (optional) - short project description
# default_branch (optional) - 'master' by default
# issues_enabled (optional)
- # wall_enabled (optional)
# merge_requests_enabled (optional)
# wiki_enabled (optional)
# snippets_enabled (optional)
@@ -129,7 +126,6 @@ module API
:description,
:default_branch,
:issues_enabled,
- :wall_enabled,
:merge_requests_enabled,
:wiki_enabled,
:snippets_enabled,