Исправление мелких багов и недочётов
This commit is contained in:
parent
1d403e2495
commit
60f86b52c8
14
api.py
14
api.py
@ -219,10 +219,16 @@ def update_mine(it: Update_mine):
|
||||
token, id, mine = it.token, it.id, it.mine
|
||||
if token_check(token):
|
||||
db = read()
|
||||
cur_mine = db['id'][id]['mine']
|
||||
del db['mine'][cur_mine]
|
||||
db['id'][id]['mine'] = mine
|
||||
db['mine'][mine] = id
|
||||
try:
|
||||
cur_mine = db['id'][id]['mine']
|
||||
del db['mine'][cur_mine]
|
||||
except:
|
||||
pass
|
||||
if mine == 'None':
|
||||
db['id'][id]['mine'] = None
|
||||
else:
|
||||
db['id'][id]['mine'] = mine
|
||||
db['mine'][mine] = id
|
||||
write(db)
|
||||
return 'OK'
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user