Framework not updated?

This commit is contained in:
jeffcheasey88 2023-09-23 17:19:29 +02:00
parent c6393ef4f3
commit 66eb81210c
4 changed files with 9 additions and 10 deletions

Binary file not shown.

View file

@ -108,7 +108,7 @@ public class Main{
router.listen(config.getTcpPort(), config.useSsl()); router.listen(config.getTcpPort(), config.useSsl());
} }
private static void initRoutes(Router<PeerAtUser> router, DatabaseRepository repo, Configuration config){ private static void initRoutes(Router<PeerAtUser> router, DatabaseRepository repo, Configuration config) throws Exception{
Map<String, Integer> playersWaiting = new HashMap<>(); Map<String, Integer> playersWaiting = new HashMap<>();
Mail mail = config.getMail(); Mail mail = config.getMail();
Locker<Group> groupLock = new Locker<>(); Locker<Group> groupLock = new Locker<>();

View file

@ -53,20 +53,19 @@ public class MailConfirmation extends FormResponse {
String initUsersFilesPath, String initUsersFilesPath,
String gitToken, String gitToken,
Map<String, Integer> playersWaiting, Map<String, Integer> playersWaiting,
Mail mail){ Mail mail) throws NoSuchAlgorithmException{
this.databaseRepo = databaseRepo; this.databaseRepo = databaseRepo;
this.router = router; this.router = router;
this.usersFilesPath = initUsersFilesPath; this.usersFilesPath = initUsersFilesPath;
this.gitToken = gitToken; this.gitToken = gitToken;
this.playersWaiting = playersWaiting; this.playersWaiting = playersWaiting;
this.mail = mail; this.mail = mail;
try {
generator = KeyPairGenerator.getInstance("RSA"); generator = KeyPairGenerator.getInstance("RSA");
generator.initialize(4096); generator.initialize(4096);
} catch (NoSuchAlgorithmException e){
e.printStackTrace();
}
encoder = Base64.getEncoder(); encoder = Base64.getEncoder();
} }
@RouteDoc(path = "/confirmation", responseCode = 200, responseDescription = "L'utilisateur est inscrit") @RouteDoc(path = "/confirmation", responseCode = 200, responseDescription = "L'utilisateur est inscrit")

View file

@ -18,8 +18,8 @@ public abstract class FormResponse implements Response{
this.checker = new HashMap<>(); this.checker = new HashMap<>();
} }
public void validator(String key, Pattern regex){ public void validator(String key, String regex){
this.checker.put(key, regex); this.checker.put(key, Pattern.compile(regex));
} }
public <T extends Json> T json(HttpReader reader) throws Exception{ public <T extends Json> T json(HttpReader reader) throws Exception{