forked from p15670423/monkey
Island: Add docstrings to Registration resource
This commit is contained in:
parent
9f02fd4e44
commit
ac34eb56e9
|
@ -12,6 +12,9 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Registration(AbstractResource):
|
class Registration(AbstractResource):
|
||||||
|
"""
|
||||||
|
A resource for user registration
|
||||||
|
"""
|
||||||
|
|
||||||
urls = ["/api/register"]
|
urls = ["/api/register"]
|
||||||
|
|
||||||
|
@ -19,6 +22,14 @@ class Registration(AbstractResource):
|
||||||
self._authentication_service = authentication_service
|
self._authentication_service = authentication_service
|
||||||
|
|
||||||
def post(self):
|
def post(self):
|
||||||
|
"""
|
||||||
|
Gets a username and password from the request sent from the client,
|
||||||
|
and registers a new user
|
||||||
|
|
||||||
|
:raises InvalidRegistrationCredentialsError: If username or password is empty
|
||||||
|
:raises AlreadyRegisteredError: If a user has already been registered
|
||||||
|
"""
|
||||||
|
|
||||||
username, password = get_username_password_from_request(request)
|
username, password = get_username_password_from_request(request)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue