
    |h                        d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dl	Z	 e
d            e            Z e            Z e            Z G d d	e          Z G d
 de          Ze                    d          defd            ZdS )    )	APIRouter)API_BaseRequest)API_BaseResponse)EasySQL)EasyUserNz GET PROFIEL DETAILS API ENDPOINTc                       e Zd ZdS )API_RequestN)__name__
__module____qualname__     AC:\xampp\htdocs\dev\Site\Backend\api\users\get_profile_details.pyr	   r	      s        Dr   r	   c                       e Zd ZU dZeed<   dS )API_Responsez{}outputN)r
   r   r   r   str__annotations__r   r   r   r   r      s"         FCr   r   z/users/get_profile_detailsrequestc                    t                      }| j        }t                              |          }|dk    rd|_        d|_        d|_        |S i }t                              |          }||d<   |                    d          |d<   |                    d          |d<   |                    d          |d<   |                    d          |d<   |                    d	          |d	<   |                    d
          |d
<   |                    d          |d<   |                    d          |d<   |                    d          |d<   |                    d          |d<   |                    d          |d<   |                    d          |d<   |                    d	          d k    rd|d	<   d|_        d|_        d|_        t          j
        |          |_        |S )NFi  zLogin Failureusernamefnamelname	post_codeemailavataraccount_typeschool_nameschool_locationdriving_licensecompany_namecompany_locationemployers_insurancedefaultT    )r   session_hashuserauthenticate_sessionsuccessstatus_codereasonget_attributesgetjsondumpsr   )r   api_responser'   r   profile_detailsuser_attributess         r   update_namer4      s     >>L'L((66H5$#& - O))(33O"*OJ.227;;OG.227;;OG#2#6#6{#C#COK .227;;OG / 3 3H = =OH&5&9&9.&I&ION#%4%8%8%G%GOM")8)<)<=N)O)OO%&)8)<)<=N)O)OO%&&5&9&9.&I&ION#*9*=*=>P*Q*QO&'-<-@-@AV-W-WO)*8$$,,$-!L"LL*_55Lr   )fastapir   api.core.EasyMessager   r   api.core.EasySQLr   api.core.EasyUserr   r/   printroutersql_connectionr(   r	   r   postr4   r   r   r   <module>r=      s0  
       0 0 0 0 0 0 1 1 1 1 1 1 $ $ $ $ $ $ & & & & & &  ( ) ) )	xzz	 	 	 	 	/ 	 	 	    #    )**' ' ' ' +*' ' 'r   