Browse Source

add respo placeholder

tripeur 2 years ago
parent
commit
85691d8759
2 changed files with 3 additions and 0 deletions
  1. 2 0
      app/api/endpoints/project.py
  2. 1 0
      app/schemas/requests.py

+ 2 - 0
app/api/endpoints/project.py

@@ -181,6 +181,7 @@ async def create_sms_batch(
      - {description} slot.description
      - {debut} slot.starting_time
      - {fin} slot.ending_ting
+     - {respo} slot.responsible_contact
      - {prenom} volunteer.name
      - {nom} volunteer.surname
 
@@ -198,6 +199,7 @@ async def create_sms_batch(
             .replace("{description}", slot.description)
             .replace("{debut}", slot.starting_time.strftime("%Hh%M"))
             .replace("{fin}", slot.ending_time.strftime("%Hh%M"))
+            .replace("{respo}", slot.responsible_contact)
         )
         sending_time = slot.starting_time - timedelta(minutes=sms_batch.delta_t)
         for volunteer in slot.volunteers:

+ 1 - 0
app/schemas/requests.py

@@ -59,6 +59,7 @@ class ProjectSMSBatchRequest(BaseRequest):
      - {description} slot.description
      - {debut} slot.starting_time
      - {fin} slot.ending_ting
+     - {respo} slot.responsible_contact
      - {prenom} volunteer.name
      - {nom} volunteer.surname""",
         examples=["Bonjour {prenom},\nTon créneau {titre} commence à {debut}.\nla com bénévole"],