|
|
@ -219,8 +219,14 @@ def update_mine(it: Update_mine):
|
|
|
|
token, id, mine = it.token, it.id, it.mine
|
|
|
|
token, id, mine = it.token, it.id, it.mine
|
|
|
|
if token_check(token):
|
|
|
|
if token_check(token):
|
|
|
|
db = read()
|
|
|
|
db = read()
|
|
|
|
|
|
|
|
try:
|
|
|
|
cur_mine = db['id'][id]['mine']
|
|
|
|
cur_mine = db['id'][id]['mine']
|
|
|
|
del db['mine'][cur_mine]
|
|
|
|
del db['mine'][cur_mine]
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
if mine == 'None':
|
|
|
|
|
|
|
|
db['id'][id]['mine'] = None
|
|
|
|
|
|
|
|
else:
|
|
|
|
db['id'][id]['mine'] = mine
|
|
|
|
db['id'][id]['mine'] = mine
|
|
|
|
db['mine'][mine] = id
|
|
|
|
db['mine'][mine] = id
|
|
|
|
write(db)
|
|
|
|
write(db)
|
|
|
|