Chatwoot/app/controllers/api/v1/accounts/conversations/labels_controller.rb
Sojan Jose 051871a3cd
Chore: Code Cleanup in API controllers (#932)
* Chore: Code Cleanup in API controllers

* Remove unnecessary scoping for accounts controller
2020-06-07 13:58:05 +05:30

11 lines
320 B
Ruby

class Api::V1::Accounts::Conversations::LabelsController < Api::V1::Accounts::Conversations::BaseController
def create
@conversation.update_labels(params[:labels])
@labels = @conversation.label_list
end
# all labels of the current conversation
def index
@labels = @conversation.label_list
end
end