mirror of
https://github.com/norohind/FDEV-CAPI-Handler.git
synced 2026-10-27 01:16:03 +03:00
add usages count for every token
This commit is contained in:
3 files changed
+11
-2
No files matched your search
@@ -8,7 +8,8 @@ schema = """create table if not exists authorizations (
|
||||
expires_in text,
|
||||
timestamp_got_expires_in text,
|
||||
nickname text unique,
|
||||
refresh_tries int default 0
|
||||
refresh_tries int default 0,
|
||||
usages int default 0
|
||||
);"""
|
||||
|
||||
insert_auth_init = """insert into authorizations
|
||||
@@ -48,3 +49,5 @@ from authorizations where state = :state;"""
|
||||
select_nickname_state_all = """select nickname, state from authorizations where nickname is not null;"""
|
||||
|
||||
del_orphans = """delete from authorizations where nickname is null;"""
|
||||
|
||||
increment_usages = "update authorizations set usages = usages + 1 where state = :state;"
|
||||
Reference in new issue
Block a user