mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-30 20:50:02 +00:00
update
This commit is contained in:
parent
c8a0a21ef2
commit
3f21c2b2c2
83 changed files with 6355 additions and 0 deletions
11
server/app/component/sqids.py
Normal file
11
server/app/component/sqids.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from sqids import Sqids
|
||||
|
||||
sqids = Sqids(min_length=10)
|
||||
|
||||
|
||||
def encode_user_id(user_id: int) -> str:
|
||||
return sqids.encode([user_id])
|
||||
|
||||
|
||||
def decode_user_id(user_id: str) -> int:
|
||||
return sqids.decode(user_id)
|
||||
Loading…
Add table
Add a link
Reference in a new issue