Skip to content

Commit

Permalink
Bug Fix: account validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Thesmader committed Apr 24, 2020
1 parent e40abe3 commit cc80275
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions gogrocy/lib/core/services/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,20 @@ class Apis {
mobile: mobile, countryCode: countryCode, password: password);
if (user.success) {
print("login via sign up success");
assert(await verifyUserApi(user.jwt), "verify user failed");
assert(
await addAddressApi(
name: name,
locality: locality,
city: city,
contact: mobile,
pinCode: zip,
jwt: user.jwt),
"add address failed");
if(user.jwt!=null){
assert(await verifyUserApi(user.jwt), "verify user failed");
assert(
await addAddressApi(
name: name,
locality: locality,
city: city,
contact: mobile,
pinCode: zip,
jwt: user.jwt),
"add address failed");
}else{
print("JWT FAIL: ACCOUNT NOT VALIDATED");
}
} else {
print("login via sign up fail");
print(user.message);
Expand Down

0 comments on commit cc80275

Please sign in to comment.