Chore: labels to Conversations [#245]

This commit is contained in:
Sojan
2019-12-24 15:31:10 +05:30
committed by Pranav Raj S
parent 7d85f2e046
commit 97ab82892d
4 changed files with 111 additions and 2 deletions

View File

@@ -2,8 +2,8 @@ class Api::V1::Conversations::LabelsController < Api::BaseController
before_action :set_conversation, only: [:create, :index]
def create
@conversation.update_labels(params[:labels].values) # .values is a hack
head :ok
@conversation.update_labels(params[:labels])
@labels = @conversation.label_list
end
def index # all labels of the current conversation