Last active
May 19, 2016 15:27
-
-
Save mattantonelli/4fb42c635936b501b2413f91d89be36d to your computer and use it in GitHub Desktop.
Transform ng-resource response that just returns a boolean
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.factory('ForgotUsername', function($resource, API_BASE) { | |
return $resource(API_BASE + 'forgetUserID', {}, { | |
get: { | |
method: 'GET', | |
transformResponse: function(data, headers) { | |
return { Result: data === true }; | |
} | |
} | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment