get_invites_remaining should return 0 if the credential is untrusted
At the moment, get_invites_remaining
returns an error if the supplied credential is untrusted. This is caused by a failure to properly deserialize it into a trusted lox_utils::LoxCredential
struct. Instead of returning the details serde_json
error in this case, we should check to see whether the credential is untrusted first (requires #49 (closed)) and in this case return 0.