diff --git a/src/main/java/com/example/cosmos_serversb/models/Users.java b/src/main/java/com/example/cosmos_serversb/models/Users.java index f5b0b6d..6beae5b 100644 --- a/src/main/java/com/example/cosmos_serversb/models/Users.java +++ b/src/main/java/com/example/cosmos_serversb/models/Users.java @@ -193,7 +193,6 @@ * トークンを削除しログインフラグを操作するためのメソッド * * TODO: queryの文に条件文を追加 - * TODO :logout 変更 */ Session session = SessionManager.getInstance().getSession(); List usersList = session.createQuery( "from User" ).list(); @@ -203,6 +202,7 @@ return DeleteResult.FAILURE; } else { // Users.getInstance().getUserByToken(token).token.remove(Users.getInstance().getUserByToken(token).token.indexOf(token)); + session.delete(session.get(Token.class, token)); return DeleteResult.SUCCESS; } }