mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 16:26:05 -04:00
Simplify LoginHander and AuthHandler
* Merge LoginHandler -> AuthHandler * Add a bunch of documentation * Improve some naming * Remove unused branches I will start merging the actual logic of the two handlers shortly
This commit is contained in:
parent
a23a760b3f
commit
415c2f0549
9 changed files with 93 additions and 131 deletions
|
@ -111,16 +111,16 @@ class RegistrationStore(SQLBaseStore):
|
|||
})
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def user_delete_access_tokens_apart_from(self, user_id, token_id):
|
||||
def user_delete_access_tokens(self, user_id):
|
||||
yield self.runInteraction(
|
||||
"user_delete_access_tokens_apart_from",
|
||||
self._user_delete_access_tokens_apart_from, user_id, token_id
|
||||
"user_delete_access_tokens",
|
||||
self._user_delete_access_tokens, user_id
|
||||
)
|
||||
|
||||
def _user_delete_access_tokens_apart_from(self, txn, user_id, token_id):
|
||||
def _user_delete_access_tokens(self, txn, user_id):
|
||||
txn.execute(
|
||||
"DELETE FROM access_tokens WHERE user_id = ? AND id != ?",
|
||||
(user_id, token_id)
|
||||
"DELETE FROM access_tokens WHERE user_id = ?",
|
||||
(user_id, )
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue