o
    Ah                     @   s   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 Zejdedeejfdedejfd	d
ZejdedeejfdedefddZdS )    )	APIRouterDependsHTTPException)database)CommunicationSettings)communicationz/{account_id})response_model
account_iddbc              
   C   s8   zt | |W S  ty } ztdt|dd }~ww )Ni  )status_codedetail)communication_serviceget_communication_settings	Exceptionr   str)r	   r
   e r   A/var/www/html/moveengine/app/v1/routers/platform/communication.pyget_settings   s   r   settingsc                 C   s   t | | |S )N)r   update_communication_settingsdict)r	   r   r
   r   r   r   update_settings   s   r   N)fastapir   r   r   app.dbr   $app.v1.models.platform.communicationr   app.v1.services.platformr   r   routergetget_mongo_dbr   MongoDBr   postr   r   r   r   r   <module>   s     "