Having trouble with sky-api-tutorial-auth-code-c-sharp when a new controller is added

I am able to run the sky-api-tutorial-auth-code-c-sharp sample to get a constituent ID. But I want general ledger data. So I created GenerealLedgerController, GeneralLedgeServive, Model etc. Updated the Layout.cshtml to with ng-controller="GeneralLedgerCtrl" and called the API with $http.get('/api/accounts/1973'). But after authenticating it is not matching with the controller. Any help with this issue would be appreciated. Thank you.

Comments

  • @Myrtle Burton
    In case anyone else is having the same issue, the way I was able to get the Ski-api working for other queries such as general ledger accounts, the controller name needs to be the same as the end point query's name. Eg. for the general ledger accounts listing, I created the controller AccountsController. The angular JS would only match and find the right query if the controller is named correctly.

Categories