router.js: changed API check