Update search challenges api and fix some jslint error.

Update search challenges api and fix some jslint error.