removeUserSessions method
Remove all sessions for a user
userId The ID of the user to remove sessions for
Implementation
Future<SuccessResponse> removeUserSessions({
required String userId,
}) async {
try {
final response = await super.dio.post(
"/admin/remove-user-sessions",
data: {"userId": userId},
options: await super.getOptions(isTokenRequired: true),
);
return SuccessResponse.fromJson(response.data);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}