Refactoring:
  1. common helper methods into ApplicationController
  2. `format` block deleted because of this apis only receive json request.