Reenabled notifications.
This commit is contained in:
parent
879ba366ab
commit
5de91cae96
3 changed files with 20 additions and 4 deletions
|
@ -27,13 +27,17 @@ class TicketArticlesController < ApplicationController
|
|||
)
|
||||
|
||||
if @article.save
|
||||
render :json => @article, :status => :created
|
||||
|
||||
# remove attachments from upload cache
|
||||
Store.remove(
|
||||
:object => 'UploadCache::TicketZoom::' + current_user.id.to_s,
|
||||
:o_id => @article.ticket_id
|
||||
)
|
||||
|
||||
# execute ticket events
|
||||
Ticket::Observer::Notification.transaction
|
||||
|
||||
render :json => @article, :status => :created
|
||||
else
|
||||
render :json => @article.errors, :status => :unprocessable_entity
|
||||
end
|
||||
|
@ -44,6 +48,10 @@ class TicketArticlesController < ApplicationController
|
|||
@article = Ticket::Article.find(params[:id])
|
||||
|
||||
if @article.update_attributes(params[:ticket_article])
|
||||
|
||||
# execute ticket events
|
||||
Ticket::Observer::Notification.transaction
|
||||
|
||||
render :json => @article, :status => :ok
|
||||
else
|
||||
render :json => @article.errors, :status => :unprocessable_entity
|
||||
|
|
|
@ -55,7 +55,10 @@ class TicketsController < ApplicationController
|
|||
:o_id => @article.ticket_id
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
# execute ticket events
|
||||
Ticket::Observer::Notification.transaction
|
||||
|
||||
render :json => @ticket, :status => :created
|
||||
end
|
||||
|
||||
|
@ -64,6 +67,10 @@ class TicketsController < ApplicationController
|
|||
@ticket = Ticket.find(params[:id])
|
||||
|
||||
if @ticket.update_attributes(params[:ticket])
|
||||
|
||||
# execute ticket events
|
||||
Ticket::Observer::Notification.transaction
|
||||
|
||||
render :json => @ticket, :status => :ok
|
||||
else
|
||||
render :json => @ticket.errors, :status => :unprocessable_entity
|
||||
|
@ -75,6 +82,9 @@ class TicketsController < ApplicationController
|
|||
@ticket = Ticket.find(params[:id])
|
||||
@ticket.destroy
|
||||
|
||||
# execute ticket events
|
||||
Ticket::Observer::Notification.transaction
|
||||
|
||||
head :ok
|
||||
end
|
||||
end
|
||||
|
|
|
@ -117,8 +117,6 @@ class Channel::EmailParser
|
|||
)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
# execute ticket events
|
||||
|
|
Loading…
Reference in a new issue