Change log & tmp remove git users
This commit is contained in:
parent
cc8ad713a7
commit
cc24278a3f
3 changed files with 23 additions and 2 deletions
Binary file not shown.
|
@ -41,6 +41,8 @@ import dev.peerat.framework.RequestType;
|
||||||
import dev.peerat.framework.Response;
|
import dev.peerat.framework.Response;
|
||||||
import dev.peerat.framework.Route;
|
import dev.peerat.framework.Route;
|
||||||
import dev.peerat.framework.Router;
|
import dev.peerat.framework.Router;
|
||||||
|
import dev.peerat.framework.Locker.Key;
|
||||||
|
import dev.peerat.framework.utils.json.JsonMap;
|
||||||
|
|
||||||
public class Main{
|
public class Main{
|
||||||
public static void main(String[] args) throws Exception{
|
public static void main(String[] args) throws Exception{
|
||||||
|
@ -81,6 +83,25 @@ public class Main{
|
||||||
});
|
});
|
||||||
|
|
||||||
initRoutes(router, repo, config);
|
initRoutes(router, repo, config);
|
||||||
|
|
||||||
|
new Thread(new Runnable(){
|
||||||
|
public void run(){
|
||||||
|
Key key = new Key();
|
||||||
|
|
||||||
|
Locker<Context> locker = router.getLogger();
|
||||||
|
|
||||||
|
locker.init(key);
|
||||||
|
try {
|
||||||
|
while(true){
|
||||||
|
locker.lock(key);
|
||||||
|
Context instance = locker.getValue(key);
|
||||||
|
System.out.println("["+((instance.isLogged()) ? repo.getPlayer(instance.<PeerAtUser>getUser().getId()).getPseudo() : "?")+"] "+instance.getType()+" "+instance.getPath()+" -> "+instance.getResponseCode());
|
||||||
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).start();
|
||||||
|
|
||||||
if(config.useSsl()) router.configureSSL(config.getSslKeystore(), config.getSslKeystorePasswd());
|
if(config.useSsl()) router.configureSSL(config.getSslKeystore(), config.getSslKeystorePasswd());
|
||||||
router.listen(config.getTcpPort(), config.useSsl());
|
router.listen(config.getTcpPort(), config.useSsl());
|
||||||
|
|
|
@ -95,8 +95,8 @@ public class MailConfirmation extends FormResponse {
|
||||||
playersWaiting.remove(email);
|
playersWaiting.remove(email);
|
||||||
int id = databaseRepo.register(pseudo, email, password, firstname, lastname, "", "", "");
|
int id = databaseRepo.register(pseudo, email, password, firstname, lastname, "", "", "");
|
||||||
if(id >= 0){
|
if(id >= 0){
|
||||||
createFolderToSaveSourceCode(pseudo);
|
// createFolderToSaveSourceCode(pseudo);
|
||||||
generateGitKey(email, pseudo, password);
|
// generateGitKey(email, pseudo, password);
|
||||||
context.response(200,
|
context.response(200,
|
||||||
"Access-Control-Expose-Headers: Authorization",
|
"Access-Control-Expose-Headers: Authorization",
|
||||||
"Authorization: Bearer " + this.router.createAuthUser(new PeerAtUser(id)));
|
"Authorization: Bearer " + this.router.createAuthUser(new PeerAtUser(id)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue