backend/src/utils/translators
2023-08-07 12:03:09 +01:00
..
ldb Fix failure if NRCC messages are not present on StaffLDB 2023-08-07 12:03:09 +01:00
README.md Add readme to translators folder 2023-08-04 00:38:44 +01:00

Translators

The utilities in the translators folder translate the upstream API into the downstream API.

The aim of the translators is to ensure a consistent data format while removing any unused data to keep the response sizes as small as possible.

Translators are kept in separate files so changes can be made in one place. Each translator exports a single function 'transform()'. This function accepts data from the upstream API and uses other functions in the file to build the API response object before returning that object to the caller.