testing api controller with the new changes
completed refactoring of api controller to use rails conventions