ApiResponse.unauthorized constructor

ApiResponse.unauthorized([
  1. String? message
])

Unauthorized response (401)

Implementation

factory ApiResponse.unauthorized([String? message]) {
  return ApiResponse.json(
    {'error': message ?? 'Unauthorized'},
    statusCode: 401,
  );
}