1212from .views .appointments import (
1313 appointment_list ,
1414 appointment_webhook ,
15+ appointment_webhook_clear ,
1516 appointment_webhook_delete ,
17+ appointment_webhook_mass ,
1618 book_appointment ,
1719 check_client ,
1820 service_list ,
1921)
2022from .views .company import company_create , company_list , company_options , company_update
21- from .views .contractor import contractor_get , contractor_list , contractor_set
23+ from .views .contractor import contractor_get , contractor_list , contractor_set , contractor_set_mass
2224from .views .enquiry import clear_enquiry , enquiry
2325
2426
2527async def startup (app : web .Application ):
2628 settings : Settings = app ['settings' ]
2729 redis = await create_pool (settings .redis_settings )
2830 app .update (
29- pg_engine = await create_engine (settings .pg_dsn ), redis = redis , session = ClientSession (),
31+ pg_engine = await create_engine (settings .pg_dsn ),
32+ redis = redis ,
33+ session = ClientSession (),
3034 )
3135
3236
@@ -50,11 +54,18 @@ def setup_routes(app):
5054 # to work with tutorcruncher websockets
5155 app .router .add_post (r'/{company}/webhook/options' , company_update , name = 'company-update' )
5256 app .router .add_post (r'/{company}/webhook/contractor' , contractor_set , name = 'webhook-contractor' )
57+ app .router .add_post (r'/{company}/webhook/contractor/mass' , contractor_set_mass , name = 'webhook-contractor-mass' )
5358 app .router .add_post (r'/{company}/webhook/clear-enquiry' , clear_enquiry , name = 'webhook-clear-enquiry' )
5459 app .router .add_post (r'/{company}/webhook/appointments/{id:\d+}' , appointment_webhook , name = 'webhook-appointment' )
60+ app .router .add_post (
61+ r'/{company}/webhook/appointments/mass' , appointment_webhook_mass , name = 'webhook-appointment-mass'
62+ )
5563 app .router .add_delete (
5664 r'/{company}/webhook/appointments/{id:\d+}' , appointment_webhook_delete , name = 'webhook-appointment-delete'
5765 )
66+ app .router .add_delete (
67+ r'/{company}/webhook/appointments/clear' , appointment_webhook_clear , name = 'webhook-appointment-clear'
68+ )
5869
5970 app .router .add_get (r'/{company}/contractors' , contractor_list , name = 'contractor-list' )
6071 app .router .add_get (r'/{company}/contractors/{id:\d+}' , contractor_get , name = 'contractor-get' )
0 commit comments