deleteSessionById method

  1. @override
Future<SessionV1?> deleteSessionById(
  1. String? correlationId,
  2. String sessionId
)
override

Deleted an session by it's unique id.

  • correlation_id (optional) transaction id to trace execution through call chain.
  • sessionId an id of the session to be deleted Return Future that receives deleted session Throws error.

Implementation

@override
Future<SessionV1?> deleteSessionById(
    String? correlationId, String sessionId) async {
  SessionV1? session;
  _sessions = _sessions.where((d) => d.id != sessionId).toList();

  return session;
}