Added refresh token endpoint
This commit is contained in:
@ -1,22 +1,17 @@
|
||||
package com.plannaplan.services;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
// import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class EventService {
|
||||
|
||||
@Autowired
|
||||
private EmailService emailService;
|
||||
// @Autowired
|
||||
// private EmailService emailService;
|
||||
|
||||
@Scheduled(cron = "0 2 17 * * *")
|
||||
public void collectGroupLosses() {
|
||||
System.out.println("Checking for groups");
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 5 18 * * *")
|
||||
public void testMail() {
|
||||
this.emailService.sendMail("kaczor982@gmail.com", "Cześć. Jestem Tomek.");
|
||||
}
|
||||
}
|
||||
|
@ -81,4 +81,8 @@ public class UserService {
|
||||
return this.repo.getAllByRole(UserRoles.STUDENT);
|
||||
}
|
||||
|
||||
public Optional<User> getUserByRefreshToken(String refreshToken) {
|
||||
return this.repo.getByRefreshToken(refreshToken);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user