cant get api to work with custom routes