fixing routes endpoint on api