refactory ApiController.js -> get action .
Extract the model function into proper model file.