Audinate interview question

How to write endpoints e.g express endpoints? Provided an example and asked to debug