mirror of
https://github.com/MCMi460/3DS-RPC.git
synced 2025-06-18 13:35:34 -04:00
Properly update last_accessed
time
This commit is contained in:
parent
45aa4c2e74
commit
51a6e108fb
@ -128,13 +128,12 @@ def createUser(friendCode:int, network:NetworkType, addNewInstance:bool = False)
|
||||
db.session.commit()
|
||||
except Exception as e:
|
||||
if 'UNIQUE constraint failed: friends.friendCode' in str(e):
|
||||
stmt = (
|
||||
select(Friend)
|
||||
db.session.execute(
|
||||
update(Friend)
|
||||
.where(Friend.friend_code == str(friendCode).zfill(12))
|
||||
.where(Friend.network == network)
|
||||
)
|
||||
friend = db.session.scalar(stmt)
|
||||
friend.last_accessed = time.time()
|
||||
.values(last_accessed=time.time())
|
||||
)
|
||||
db.session.commit()
|
||||
|
||||
def fetchBearerToken(code:str):
|
||||
|
Loading…
Reference in New Issue
Block a user