unbanUser method
Unban a user
userId The ID of the user to unban
Implementation
Future<UnbanUserResponse<T>> unbanUser({
required String userId,
}) async {
try {
final response = await super.dio.post(
"/admin/unban-user",
data: {"userId": userId},
options: await super.getOptions(isTokenRequired: true),
);
return UnbanUserResponse<T>.fromJson(response.data, super.fromJsonUser);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}