2020-03-09 17:57:10 +00:00
|
|
|
class Api::V1::Accounts::Conversations::LabelsController < Api::BaseController
|
2019-08-14 09:48:44 +00:00
|
|
|
before_action :set_conversation, only: [:create, :index]
|
|
|
|
|
|
|
|
def create
|
2019-12-24 10:01:10 +00:00
|
|
|
@conversation.update_labels(params[:labels])
|
|
|
|
@labels = @conversation.label_list
|
2019-08-14 09:48:44 +00:00
|
|
|
end
|
|
|
|
|
2020-03-09 17:57:10 +00:00
|
|
|
# all labels of the current conversation
|
|
|
|
def index
|
2019-08-14 09:48:44 +00:00
|
|
|
@labels = @conversation.label_list
|
|
|
|
end
|
|
|
|
end
|