
    4hN                     v   d dl Z d dlmZ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mZmZmZmZ  e       Z ee      j'                         j(                  j(                  j(                  dz  Zej-                  d	d	
        e        ej/                  d      defd       Zej/                  d      d        Zy)    N)	APIRouterDepends)Path)"disable_installed_extensions_check)FileResponse)check_token_validityempty_databasecreate_others_rolecreate_all_permissionscreate_super_admin_rolefilesT)parentsexist_okz/files/{file_name}	file_namec                 v   K   t         | z  }t        d|        |j                         rt        |      S ddiS w)NzLooking for file at: errorzFile not found)
UPLOAD_DIRprintexistsr   )r   	file_paths     I/Users/theessential/Documents/Github/Lekema-Backend/app/routers/others.pyget_filer      sC     Y&I	!)
-.I&&%&&s   79z/initialize_databasec                  b   K   t                t                t                t                ddiS w)NstatuszDatabase initializedr	        r   initialize_databaser      s*     ,--s   -/)	mimetypesfastapir   r   pathlibr   fastapi_pagination.utilsr   starlette.responsesr   app.utils.authentificationr   app.utils.roler
   r   r   r   router__file__resolveparentr   mkdirgetstrr   r   r   r   r   <module>r-      s     &  G , ; n n	(^##%,,33::WD
 
    - " $  !'c ' "' "#. $.r   