fixed api routes for library