1515import com .apporelbotna .gameserver .stubs .User ;
1616import com .apporelbotna .gameserver .stubs .UserWrapper ;
1717
18- //TODO los memtodos devuelven un HttpStatus que es el code de segun si ha ido bien, mal, etc.
18+ //TODO los metodos devuelven un HttpStatus que es el code de segun si ha ido bien, mal, etc.
1919//esto se podria hacer alguna clase que controlase los codigos que se mostraran en la applicacion
2020//personalizados y en diferentes idiomas
2121
@@ -29,16 +29,6 @@ public DAO()
2929
3030 }
3131
32- // public boolean isUserLoggeable(String email, String tokenString)
33- // {
34- // UserWrapper wrapper = new UserWrapper(new User(email), new Token(tokenString));
35- //
36- // ResponseEntity<?> response = restTemplate.postForEntity(SERVER_URL + "/auth", wrapper,
37- // null);
38- //
39- // return (response.getStatusCode().equals(HttpStatus.OK));
40- // }
41-
4232 public boolean isUserLoggeable (String email , String tokenString )
4333 {
4434 UserWrapper wrapper = new UserWrapper (new User (email ), new
@@ -53,7 +43,7 @@ public boolean isUserLoggeable(String email, String tokenString)
5343
5444 public User validateUser (String email , String tokenString )
5545 {
56-
46+ //TODO implement
5747 return null ;
5848 }
5949
@@ -120,50 +110,6 @@ public List<RankingPointsTO> getRankingPointsByGameAndUser(int gameId)
120110 return responseWS .getBody ();
121111 }
122112
123- public static void main (String [] args )
124- {
125- DAO dao = new DAO ();
126-
127- // Creating User
128- // User user = new User("[email protected] ", "Jan"); 129- // String password = "1234";
130- //
131- // System.out.println(dao.createUser(user, password));
132-
133- // Testing log in
134- //
135- // String email = "[email protected] "; 136- // String password = "1234";
137- // Token token = dao.login(email, password);
138- // System.out.println(token);
139-
140- // Find all games by username
141- // List<Game> games = dao.findAllGamesByUser(new User("[email protected] ", "pp")); 142- // for (Game game : games)
143- // {
144- // System.out.println(game);
145- // }
146-
147- // TEST USER INFORMATION
148-
149- // User userInformatiton = dao.getUserInformation("[email protected] "); 150- // System.out.println(userInformatiton);
151-
152- // GET TIME PLAYED IN GAME
153- // String email = "[email protected] "; 154- // int game = 1;
155- // System.out.println(dao.gameTimePlayedByGame(email, game));
156-
157- // List<RankingPointsTO> ranking = dao.getRankingPointsByGameAndUser(1);
158- // for (RankingPointsTO rankingPointsTO : ranking)
159- // {
160- // System.out.println(rankingPointsTO);
161- // }
162-
163- // Auth
164- System .out .println (
165- dao .
isUserLoggeable (
"[email protected] " ,
"114e39264fd343e98e138837172a9e36" ));
166113
167- }
168114
169115}
0 commit comments