Skip to content

Commit

Permalink
Merge pull request #25 from DataScience-GT/development
Browse files Browse the repository at this point in the history
points commented out
  • Loading branch information
vicente6j authored Feb 10, 2024
2 parents f336465 + 4a2f2e8 commit 0eecc20
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions lib/viewmodel/checkin.viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -314,22 +314,23 @@ class CheckinViewModel extends ChangeNotifier {
// }

// create user points
if (event.points != null) {
Points p = Points(
userID: _user.username,
points: event.points ?? 0,
userName: _user.attributes["name"]);
var request4 = ModelMutations.create(p);
var operation4 = Amplify.API.mutate(request: request4);
var response4 = await operation4.response;
if (response4.errors.isNotEmpty) {
_error = response4.errors.first.message;

_loadingUser = false;
if (_mounted) notifyListeners();
return;
}
}
// if (event.points != null) {
// Points p = Points(
// userID: _user.username,
// points: event.points ?? 0,
// userName: _user.attributes["name"]);
// var request4 = ModelMutations.create(p);
// var operation4 = Amplify.API.mutate(request: request4);
// var response4 = await operation4.response;
//
// if (response4.errors.isNotEmpty) {
// _error = response4.errors.first.message;
//
// _loadingUser = false;
// if (_mounted) notifyListeners();
// return;
// }
// }

_loadingUser = false;

Expand Down

0 comments on commit 0eecc20

Please sign in to comment.