Secured the /flats endpoint of the API