Skip to content

Services Overview

INFO

Services can be implemented either as part of/related to a specific collection type or completely independent from a collection type. If implemented as part of a collection type the route, controller and service files are stored under the collection type content folder src/api/collection-name/ respectively. If implemented independent of a collection type, the files are stored in the src/routes and src/controllers folder

CollectionServicenameDetailsFunctionality
MembersactualRunsImplemented in:
services/member.js
Endpoint:
/members/:id/actual-runs
Controller:
controllers/actualRuns.js
calculate members actual_runscount
generatePDFImplemented in:
services/singin.js
Endpoint:
/members/download-pdf
Controller:
controllers/signin.js
create a PDF document for a run identified by run_date with the paper based sign-in sheet, for Beer and Non-Beer Members as well as guests
getSignInDataImplemented in:
controllers/signin.js
Endpoint:
/members/getsigninjson
Controller:
controllers/signin.js
create a JSON object with the actual active members for a run identified by run_date. Required to load the data for the actual digital sign-in sheet.
HarelinerunInfoComplexImplemented in:
services/run.js
Endpoint:
/runs/run-info-complex
Controller:
controllers/runinfo.js
creates a JSON object including all run details between start_date and end_date; if only one date provided single run is returned. Used for the hero run on the frontend homepage.
runInfoImplemented in:
services/run.js
Endpoint:
/runs/run-info
Controller:
controllers/runinfo.js
creates a JSON object including reduced run details between start_date and end_date; if only one date provided single run is returned. Used for the next run gallery on the frontend homepage
runPlanningImplemented in:
services/run.js
Endpoint:
/runs/run-planning
Controller:
controllers/runinfo.js
creates information required for the run planning process of Trail Mistress (mainly last run set by a member); this service has been replaced by a Metabase query/dashboard and is deprecated
Onsite SalesgeneratePDFImplemented in:
services/financialReport.js
Endpoint:
/onsite-sales/financial-report
Controller:
controllers/financialReport.js
Create a PDF cash flow report for the run defined by start_date
No CollectiongenerateImplemented in:
controllers/metabase-token
Endpoint:
/metabase-token
Controller:
controllers/metabase-token.js
Sign the JWT token and create the dashboard URL for the Metabase reporting iFrame
headImplemented in:
controllers/ping
Endpoint:
/ping
Controller:
controllers/ping.js
Minimal response to a ping request from the frontend in order to confirm that the frontend is online/offline

Released under the MIT License.