Skip to content

Commit

Permalink
Merge pull request #43 from dnd-side-project/dev
Browse files Browse the repository at this point in the history
relase main
  • Loading branch information
eun-seong authored Feb 19, 2024
2 parents 45cca82 + e486684 commit 212932f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public BestWorthDashboardComponent(Statistics statistics) {

@Override
public void calculate(Statistics statistics) {
RatioStatistic bestWorth = (RatioStatistic) statistics.getStatisticsByDashboardType(this.dashboardType)
.getFirst();
RatioStatistic bestWorth = (RatioStatistic) statistics.getStatisticsByDashboardType(this.dashboardType).get(0);
Long totalCount = bestWorth.getTotalCount();
this.rank = bestWorth.getLegends().stream()
.map(legend -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public HappyDashboardComponent(Statistics statistics) {

@Override
public void calculate(Statistics statistics) {
RatioStatistic happy = (RatioStatistic) statistics.getStatisticsByDashboardType(this.dashboardType)
.getFirst();
RatioStatistic happy = (RatioStatistic) statistics.getStatisticsByDashboardType(this.dashboardType).get(0);
Long totalCount = happy.getTotalCount();
this.rank = happy.getLegends().stream()
.map(legend -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public MoneyDashboardComponent(Statistics statistics) {

@Override
public void calculate(Statistics statistics) {
AverageStatistic money = (AverageStatistic) statistics.getStatisticsByDashboardType(this.dashboardType)
.getFirst();
AverageStatistic money = (AverageStatistic) statistics.getStatisticsByDashboardType(this.dashboardType).get(0);
this.peopleCount = money.getTotalCount();
this.moneySum = money.getTotalSum();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public SadDashboardComponent(Statistics statistics) {

@Override
public void calculate(Statistics statistics) {
RatioStatistic sad = (RatioStatistic) statistics.getStatisticsByDashboardType(this.dashboardType)
.getFirst();
RatioStatistic sad = (RatioStatistic) statistics.getStatisticsByDashboardType(this.dashboardType).get(0);
Long totalCount = sad.getTotalCount();
this.rank = sad.getLegends().stream()
.map(legend -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public CreateSurveyResponse createSurvey(CreateSurveyRequest request, SurveyAnsw
.orElseThrow(() -> new ApplicationErrorException(ApplicationErrorType.NOT_FOUND_USER));
User sender = getUserByAccessToken(accessToken);

validateNotFromMe(owner, sender);
// validateNotFromMe(owner, sender);

Survey survey = surveyRepository.save(Survey.builder()
.owner(owner)
Expand Down

0 comments on commit 212932f

Please sign in to comment.