Skip to content

Commit

Permalink
add SaveSurveyResult composition
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanguinho committed Oct 26, 2020
1 parent 39de388 commit ab636cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ import '../../factories.dart';

SurveyResultPresenter makeGetxSurveyResultPresenter(String surveyId) => GetxSurveyResultPresenter(
loadSurveyResult: makeRemoteLoadSurveyResultWithLocalFallback(surveyId),
saveSurveyResult: makeRemoteSaveSurveyResult(surveyId),
surveyId: surveyId
);
8 changes: 8 additions & 0 deletions lib/main/factories/usecases/save_survey_result_factory.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import '../../../data/usecases/usecases.dart';
import '../../../domain/usecases/usecases.dart';
import '../factories.dart';

SaveSurveyResult makeRemoteSaveSurveyResult(String surveyId) => RemoteSaveSurveyResult(
httpClient: makeAuthorizeHttpClientDecorator(),
url: makeApiUrl('surveys/$surveyId/results')
);
1 change: 1 addition & 0 deletions lib/main/factories/usecases/usecases.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ export './authentication_factory.dart';
export './add_account_factory.dart';
export './load_surveys_factory.dart';
export './load_survey_result_factory.dart';
export './save_survey_result_factory.dart';
export './save_current_account_factory.dart';
export './load_current_account_factory.dart';

0 comments on commit ab636cf

Please sign in to comment.