Refactor profile details page

This commit is contained in:
problematicconsumer
2023-09-28 14:03:45 +03:30
parent fa32b85628
commit f126bf3201
12 changed files with 267 additions and 114 deletions

View File

@@ -159,6 +159,23 @@ class ProfilesRepositoryImpl
);
}
@override
TaskEither<ProfileFailure, Unit> edit(Profile profile) {
return exceptionHandler(
() async {
loggy.debug(
"editing profile [${profile.name} (${profile.id})]",
);
await profilesDao.edit(profile);
return right(unit);
},
(error, stackTrace) {
loggy.warning("error editing profile", error, stackTrace);
return ProfileUnexpectedFailure(error, stackTrace);
},
);
}
@override
TaskEither<ProfileFailure, Unit> setAsActive(String id) {
return TaskEither.tryCatch(