mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-07 21:55:20 +08:00
Additionaly removed some unneeded code, related to the previous commit.
This commit is contained in:
parent
fa7710fb80
commit
61d1f5374d
1 changed files with 36 additions and 42 deletions
|
@ -51,7 +51,6 @@ class StepCommentsController < ApplicationController
|
|||
step_comment_annotation_notification
|
||||
# Generate activity (this can only occur in module,
|
||||
# but nonetheless check if my module is not nil)
|
||||
if @protocol.in_module?
|
||||
Activity.create(
|
||||
type_of: :add_comment_to_step,
|
||||
user: current_user,
|
||||
|
@ -65,7 +64,6 @@ class StepCommentsController < ApplicationController
|
|||
step_name: @step.name
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
format.json {
|
||||
render json: {
|
||||
|
@ -112,7 +110,6 @@ class StepCommentsController < ApplicationController
|
|||
|
||||
step_comment_annotation_notification(old_text)
|
||||
# Generate activity
|
||||
if @protocol.in_module?
|
||||
Activity.create(
|
||||
type_of: :edit_step_comment,
|
||||
user: current_user,
|
||||
|
@ -126,7 +123,6 @@ class StepCommentsController < ApplicationController
|
|||
step_name: @step.name
|
||||
)
|
||||
)
|
||||
end
|
||||
message = custom_auto_link(@comment.message)
|
||||
render json: { comment: message }, status: :ok
|
||||
else
|
||||
|
@ -142,7 +138,6 @@ class StepCommentsController < ApplicationController
|
|||
format.json do
|
||||
if @comment.destroy
|
||||
# Generate activity
|
||||
if @protocol.in_module?
|
||||
Activity.create(
|
||||
type_of: :delete_step_comment,
|
||||
user: current_user,
|
||||
|
@ -156,7 +151,6 @@ class StepCommentsController < ApplicationController
|
|||
step_name: @step.name
|
||||
)
|
||||
)
|
||||
end
|
||||
render json: {}, status: :ok
|
||||
else
|
||||
render json: { message: I18n.t('comments.delete_error') },
|
||||
|
|
Loading…
Add table
Reference in a new issue