a
    %v\e                  
   @   sB  d dl mZ d dlmZ d dlmZmZmZ d dlm	Z	 d dl
mZ d dlmZ eeZeje  dejd< d	ejd
< ddddddiZeedddeddddZeeZe	eZeeZd dlmZ ee eddd Zeddd Zeddd  Zed!d"d# Zed$d%d& Z ed'd(d) Z!d*S )+    )Api)CORS)Flask	send_filesend_from_directory)MongoEngine)
JWTManager)ConfigZ	templatesZTEMPLATES_FOLDERTZTEMPLATES_AUTO_RELOADZBearer_TokenZapiKeyZheaderZAuthorizationzWType in the *'Value'* input box below: **'Bearer &lt;JWT&gt;'**, where JWT is the token)typeZinnamedescriptionzAccount Management Service APIz1.0aU  <p>The Account Management Service API is dedicated to user account management, and access control.</p><p>It provides secure and robust mechanisms for account management.</p><p>This service ensures the protection of user data and identity, making it an ideal solution for building a secure account management system for your applications.</p>z/swaggerz/api)titleversionr   authorizationsZsecurityZdocprefix)account_namespace/c                   C   s   dS )Nzd<h1>Welcome to the Account Management Service API</h1><p>Go to <a href='/swagger'>Swagger UI</a></p> r   r   r   /app/app/__init__.pyhome6   s    r     c                 C   s   ddddfS )NzInternal Server Errorz@An internal server error occurred while processing your request.errormsgr   r   er   r   r   internal_server_error;   s
    r     c                 C   s   ddddfS )NzBad RequestzMThe request you made was invalid. Please check your input data and try again.r   r   r   r   r   r   r   bad_request_errorB   s
    r     c                 C   s   ddddfS )NZUnauthorizedz\You are not authorized to access this resource. Please log in and provide valid credentials.r   r   r   r   r   r   r   unauthorized_errorI   s
    r      c                 C   s   ddddfS )NZ	Forbiddenz3You do not have permission to access this resource.r   r!   r   r   r   r   r   forbidden_errorP   s
    r"     c                 C   s   ddddfS )Nz	Not Foundz.The requested URL was not found on the server.r   r#   r   r   r   r   r   page_not_foundW   s
    r$   N)"Zflask_restxr   Z
flask_corsr   Zflaskr   r   r   Zflask_mongoenginer   Zflask_jwt_extendedr   Zapp.config.settingsr	   __name__appZconfigZfrom_objectr   ZapiZcorsZdbZjwtZapp.resources.v1.accountr   Zadd_namespaceZrouter   Zerrorhandlerr   r   r    r"   r$   r   r   r   r   <module>   sV   








