summaryrefslogtreecommitdiff
path: root/app/controllers/v1/messages_controller.rb
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-07-18 12:21:49 +0200
committerazul <azul@leap.se>2014-07-18 12:21:49 +0200
commitbbd41c9bfd2cb88a88d7436dd58a8b46a5d10cf1 (patch)
tree00b39da219151473437c02ce35344117bcd5b2fa /app/controllers/v1/messages_controller.rb
parentade74d8a9091ae607586d7b287a0579a2ee7af8e (diff)
parent20352249fa5dafe3abb2d4b751b1e5c8c0a59abc (diff)
Merge pull request #180 from azul/feature/messages-api
Feature/messages api
Diffstat (limited to 'app/controllers/v1/messages_controller.rb')
-rw-r--r--app/controllers/v1/messages_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/v1/messages_controller.rb b/app/controllers/v1/messages_controller.rb
index a9b93a9..a496378 100644
--- a/app/controllers/v1/messages_controller.rb
+++ b/app/controllers/v1/messages_controller.rb
@@ -11,9 +11,9 @@ module V1
if message = Message.find(params[:id])
message.mark_as_read_by(current_user)
message.save
- render json: true
+ render json: success(:marked_as_read)
else
- render json: false
+ render json: error(:not_found), status: :not_found
end
end