Skip to content

Commit

Permalink
remove custom logging for create/update doi and event
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Jun 2, 2020
1 parent 455febd commit cbe00d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions app/controllers/dois_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ def create
affiliation: params[:affiliation]
}

logger.warn "Created DOI #{@doi.doi}"
render json: DoiSerializer.new(@doi, options).serialized_json, status: :created, location: @doi
else
logger.error @doi.errors.inspect
Expand Down Expand Up @@ -409,7 +408,6 @@ def update
affiliation: params[:affiliation],
}

logger.warn exists ? "Updated DOI #{@doi.doi}" : "Created DOI #{@doi.doi}"
render json: DoiSerializer.new(@doi, options).serialized_json, status: exists ? :ok : :created
else
logger.error @doi.errors.messages
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create
if @event.update_attributes(safe_params)
options = {}
options[:is_collection] = false
logger.warn "Created event #{@event.uuid} with source_id #{@event.source_id}"

render json: EventSerializer.new(@event, options).serialized_json, status: exists ? :ok : :created
else
logger.error @event.errors.inspect
Expand All @@ -48,7 +48,6 @@ def update
options = {}
options[:is_collection] = false

logger.warn "Updated event #{@event.uuid} with source_id #{@event.source_id}"
render json: EventSerializer.new(@event, options).serialized_json, status: exists ? :ok : :created
else
logger.error @event.errors.inspect
Expand Down

0 comments on commit cbe00d2

Please sign in to comment.