karma-exchange-org/karma-exchange — pull request #307 by avaliani (2014-01-04 03:10:24+00:00)
Title: Fix OAuthException bug!!!

All $resource requests now wait for the first OAuth response. This way when we pass in the OAuth id we are guaranteed to have a valid OAuth token.

We can optimize this in the future for the non-facebook user if we want.

Note that since all $resource requests are wrapped, the get and query method no longer return objects that are future filled in with the results. Instead they return promises (I think this is the angular 1.2 style). Therefore any variables that were set with return values from get / query in the past now need to be explicitly set in the success / fail callbacks.