Files
superport/lib/domain/usecases/auth/get_current_user_usecase.dart
JiWoong Sul 655d473413
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled
web: migrate health notifications to js_interop; add browser hook
- Replace dart:js with package:js in health_check_service_web.dart\n- Implement showHealthCheckNotification in web/index.html\n- Pin js dependency to ^0.6.7 for flutter_secure_storage_web compatibility

auth: harden AuthInterceptor + tests

- Allow overrideAuthRepository injection for testing\n- Normalize imports to package: paths\n- Add unit test covering token attach, 401→refresh→retry, and failure path\n- Add integration test skeleton gated by env vars

ui/data: map User.companyName to list column

- Add companyName to domain User\n- Map UserDto.company?.name\n- Render companyName in user_list

cleanup: remove legacy equipment table + unused code; minor warnings

- Remove _buildFlexibleTable and unused helpers\n- Remove unused zipcode details and cache retry constant\n- Fix null-aware and non-null assertions\n- Address child-last warnings in administrator dialog

docs: update AGENTS.md session context
2025-09-08 17:39:00 +09:00

18 lines
583 B
Dart

import 'package:dartz/dartz.dart';
import '../../repositories/auth_repository.dart';
import '../../../data/models/auth/auth_user.dart';
import '../../../core/errors/failures.dart';
import '../base_usecase.dart';
/// 현재 로그인한 사용자 정보 조회 UseCase (AuthRepository 기반)
class GetCurrentUserUseCase extends UseCase<AuthUser, NoParams> {
final AuthRepository _authRepository;
GetCurrentUserUseCase(this._authRepository);
@override
Future<Either<Failure, AuthUser>> call(NoParams params) async {
return await _authRepository.getCurrentUser();
}
}