summaryrefslogtreecommitdiff
path: root/app/controllers/v1
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-03-30 17:06:32 -0700
committerelijah <elijah@riseup.net>2016-03-30 17:06:32 -0700
commit48acca107b9bd7a59bacb1449b042eb753e63917 (patch)
treece8bee7d2fa4007a1db9815e1af001fe44e329c1 /app/controllers/v1
parentbd5ffce445fd91eac32ac1309297e7e3cf05ead8 (diff)
api: return proper 404 for GET /1/identities/:id.json
Diffstat (limited to 'app/controllers/v1')
-rw-r--r--app/controllers/v1/identities_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/v1/identities_controller.rb b/app/controllers/v1/identities_controller.rb
index 1d8c542..4efd1f5 100644
--- a/app/controllers/v1/identities_controller.rb
+++ b/app/controllers/v1/identities_controller.rb
@@ -5,7 +5,11 @@ module V1
def show
@identity = Identity.find_by_address(params[:id])
- respond_with @identity
+ if @identity
+ respond_with @identity
+ else
+ render_not_found
+ end
end
end