- @note = Note.find_by_id(id)
- fail OSM::APINotFoundError unless @note
- fail OSM::APIAlreadyDeletedError.new("note", @note.id) unless @note.visible? || @user.moderator?
- fail OSM::APINoteAlreadyOpenError.new(@note) unless @note.closed? || !@note.visible?
+ @note = Note.find_by(:id => id)
+ raise OSM::APINotFoundError unless @note
+ raise OSM::APIAlreadyDeletedError.new("note", @note.id) unless @note.visible? || @user.moderator?
+ raise OSM::APINoteAlreadyOpenError.new(@note) unless @note.closed? || !@note.visible?