updateGlobalAccount method
Implementation
@override
Future<Map> updateGlobalAccount(
String token, String globalAccountId, String newNickName) async {
final baseUrl = await getBaseUrl;
var url =
Uri.parse("$baseUrl/api/v1/global_accounts/update/$globalAccountId");
var bodyData = {"nick_name": newNickName};
var jsonBody = jsonEncode(bodyData);
var response = await http.post(
url,
headers: {
"Authorization": "Bearer $token",
"Content-Type": "application/json"
},
body: jsonBody,
);
var data = jsonDecode(response.body);
return data;
}