attachUser method

Future<Map> attachUser(
  1. String username
)

Signing in a user with the given username and password Attach a user with the given username

Implementation

// Future<Map> signInUser(String username, String password) async {
//   String url = "$_endpoint/login?username=$username&password=$password";
//   var response = await http.get(Uri.parse(url));
//
//   if (response.statusCode != 200) {
//     return {};
//   }
//
//   return json.decode(response.body);
// }

/// Attach a user with the given username
Future<Map> attachUser(String username) async {
  var userId = await getUserId(username);
  return {
    'userID': userId,
  };
}