Update api.js

Add route only when DB search is not disabled