Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/main/java/org/radarbase/appserver/service/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ public FcmUserDto saveUserInProject(FcmUserDto userDto) {
// maintain a bi-directional relationship
newUser.getUsermetrics().setUser(newUser);
User savedUser = this.userRepository.saveAndFlush(newUser);
// Generate schedule for user
this.scheduleService.generateScheduleForUser(savedUser);
Comment on lines -168 to -169
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any use of the schedulerService variable, this can be removed.

return userConverter.entityToDto(savedUser);
}

Expand Down Expand Up @@ -195,14 +193,6 @@ public FcmUserDto updateUser(FcmUserDto userDto) {
// maintain a bi-directional relationship
user.getUsermetrics().setUser(user);
User savedUser = this.userRepository.saveAndFlush(user);
// Generate schedule for user
if (!user.getAttributes().equals(userDto.getAttributes())
|| !user.getTimezone().equals(userDto.getTimezone())
|| !user.getEnrolmentDate().equals(userDto.getEnrolmentDate())
|| !user.getLanguage().equals(userDto.getLanguage()))
{
Comment on lines -199 to -203
Copy link
Member

@this-Aditya this-Aditya Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not wrong, the /schedule endpoint will be called by the questionnaire app. Do we have checks in the app to ensure that this endpoint is only called when updating the user, and only if these properties don’t match?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes the user will be calling the update endpoint from the app anyway so they can just call the schedule endpoint afterwards. We can make the updates afterwards in a separate PR since we have not enabled the app server scheduling yet for users.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh okay, Thanks.

this.scheduleService.generateScheduleForUser(savedUser);
}
return userConverter.entityToDto(savedUser);
}

Expand Down
Loading