Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add apidoc to /api/v1/me.json.

  • Loading branch information...
commit 1d509826119f786a09b070d69a499a4b6e3bbc54 1 parent 5b5754b
Logan Hanks authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  r2/r2/controllers/apiv1.py
2  r2/r2/controllers/apiv1.py
View
@@ -21,6 +21,7 @@
###############################################################################
from pylons import c
+from r2.controllers.api_docs import api_doc, api_section
from r2.controllers.oauth2 import OAuth2ResourceController, require_oauth2_scope
from r2.lib.jsontemplates import IdentityJsonTemplate
@@ -29,6 +30,7 @@ def try_pagecache(self):
pass
@require_oauth2_scope("identity")
+ @api_doc(api_section.account)
def GET_me(self):
"""Returns the identity of the user currently authenticated via OAuth."""
resp = IdentityJsonTemplate().data(c.oauth_user)
Please sign in to comment.
Something went wrong with that request. Please try again.