Skip to content

Commit

Permalink
DEAR-98 wip
Browse files Browse the repository at this point in the history
  • Loading branch information
smuefsmuef committed Jul 25, 2024
1 parent 605ad1a commit bd18d7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class InsightsController {
@Autowired
private InsightsService insightsService;

// todo use mapper to map the DTO to the entity
@GetMapping("happiness/team-vs-personal/{userId}")
public List<HappinessInsightsChartDTO> getDailyAverages(@PathVariable Integer userId) {
return insightsService.getDailyAveragesByUserId(userId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class InsightsService {
private HappinessSurveyRepository happinessSurveyRepository;

// todo add user authorization
// todo add yappi exception handling
@Transactional(readOnly = true)
public List<HappinessInsightsChartDTO> getDailyAveragesByUserId(Integer userId) {
List<Object[]> userAverages = happinessSurveyRepository.findDailyAveragesByUserId(userId);
Expand Down

0 comments on commit bd18d7d

Please sign in to comment.