Skip to content

Instantly share code, notes, and snippets.

@gajanan0707
Last active October 5, 2022 12:10
Show Gist options
  • Save gajanan0707/f0eaaba4a89f5675146649b3e655cda0 to your computer and use it in GitHub Desktop.
Save gajanan0707/f0eaaba4a89f5675146649b3e655cda0 to your computer and use it in GitHub Desktop.
FLASK_DEMO_REST/user
from flask_restful import Api
from users.views import LoginApi, ForgotPassword, SignUpApi, ResetPassword
def create_authentication_routes(api: Api):
"""Adds resources to the api.
:param api: Flask-RESTful Api Object
"""
api.add_resource(SignUpApi, "/api/auth/register/")
api.add_resource(LoginApi, "/api/auth/login/")
api.add_resource(ForgotPassword, "/api/auth/forgot-password/")
api.add_resource(ResetPassword, "/api/auth/reset-password/<token>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment