File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
apps/webhook_listeners/lib/Db Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -97,19 +97,6 @@ public function addEphemeralToken(
9797 );
9898 return $ this ->insert ($ tempToken );
9999 }
100-
101- /**
102- * @throws Exception
103- */
104- public function deleteByTokenId (int $ tokenId ): bool {
105- $ qb = $ this ->db ->getQueryBuilder ();
106-
107- $ qb ->delete ($ this ->getTableName ())
108- ->where ($ qb ->expr ()->eq ('token_id ' , $ qb ->createNamedParameter ($ tokenId , IQueryBuilder::PARAM_INT )));
109-
110- return $ qb ->executeStatement () > 0 ;
111- }
112-
113100 public function invalidateOldTokens (int $ token_lifetime = self ::TOKEN_LIFETIME ) {
114101 $ olderThan = $ this ->time ->getTime () - $ token_lifetime ;
115102 try {
@@ -124,7 +111,7 @@ public function invalidateOldTokens(int $token_lifetime = self::TOKEN_LIFETIME)
124111 foreach ($ tokensToDelete as $ token ) {
125112 try {
126113 $ this ->tokenMapper ->delete ($ this ->tokenMapper ->getTokenById ($ token ->getTokenId ())); // delete token itself
127- $ this ->deleteByTokenId ($ token-> getTokenId () ); // delete db row in webhook_tokens
114+ $ this ->delete ($ token ); // delete db row in webhook_tokens
128115 } catch (Exception $ e ) {
129116 $ this ->logger ->error ('Webhook token deletion failed: ' . $ e ->getMessage (), ['exception ' => $ e ]);
130117 }
You can’t perform that action at this time.
0 commit comments