[refactor] getBugList logical code seperate from route to service
[new feature] getBugById ; [refactor] pass params as json; [fixed bug] db connection fault

recreate connection when service method is called , and close it when no
error throws.