
    h                         d dl mZ d dl mZ d dlmZ d dlmZ d dlZd dl	Z	 e            Z
e
                    edgddgdg            ee          j        d	z  Zd
efdZdefdZ ee           dS )    )Cookie)FastAPI)CORSMiddleware)PathN*T)allow_originsallow_credentialsallow_methodsallow_headersapipathc                    d                     |                     t          t                    j                                      d          j                  }t          j        	                    |t          |                     }|rQ|j        rJt          j                            |          }|t          j        |<   |j                            |           |S d S )N. )joinrelative_tor   __file__parentwith_suffixparts	importlibutilspec_from_file_locationstrloadermodule_from_specsysmodulesexec_module)r   module_namespecmods       (C:\xampp\htdocs\dev\Site\Backend\main.pyimport_module_from_pathr$      s    ((4++DNN,ABBNNrRRXYYK>11+s4yyIID  n--d33#&K $$$
4    api_dirc                     |                      d          D ]M}t          |          }|r:t          |d          r*t          |d          }t                              |           Nd S )Nz*.pyrouter)rglobr$   hasattrgetattrappinclude_router)r&   py_filer"   r(   s       r#   include_all_routersr/   !   sq    ==(( ' '%g.. 	'73)) 	'S(++Fv&&&	' 'r%   )fastapir   r   fastapi.middleware.corsr   pathlibr   importlib.utilr   r   r,   add_middlewarer   r   API_DIRr$   r/    r%   r#   <module>r7      s               2 2 2 2 2 2           



gii   %%%     $x..
%
'$    ' ' ' ' '  G     r%   