diff --git a/src/v3/controllers/users_controller.ts b/src/v3/controllers/users_controller.ts index bff23c04..27d1e291 100644 --- a/src/v3/controllers/users_controller.ts +++ b/src/v3/controllers/users_controller.ts @@ -465,7 +465,7 @@ export const retrieveUserBackup = async (req: Request, res: Response) => { if (personMinimal) { const minimalPersons = cong.persons.map((record) => { - const includeTimeAway = cong.settings.time_away_public.value; + const includeTimeAway = cong.settings.time_away_public?.value ?? false; const personData = record.person_data as StandardRecord; diff --git a/src/v3/routes/users.ts b/src/v3/routes/users.ts index 91a45fb9..d71f9134 100644 --- a/src/v3/routes/users.ts +++ b/src/v3/routes/users.ts @@ -48,7 +48,7 @@ router.get('/:id/applications', getAuxiliaryApplications); router.post('/:id/applications', body('application').isObject().notEmpty(), submitAuxiliaryApplication); // post field service report -router.post('/:idfield-service-reports', body('report').isObject().notEmpty(), postUserReport); +router.post('/:id/field-service-reports', body('report').isObject().notEmpty(), postUserReport); // retrieve congregation backup router.get('/:id/backup', retrieveUserBackup);