shorten link id
This commit is contained in:
@@ -7,7 +7,7 @@ from .models import CreatePayLinkData, PayLink
|
|||||||
|
|
||||||
|
|
||||||
async def create_pay_link(data: CreatePayLinkData, wallet_id: str) -> PayLink:
|
async def create_pay_link(data: CreatePayLinkData, wallet_id: str) -> PayLink:
|
||||||
link_id = urlsafe_short_hash()
|
link_id = urlsafe_short_hash()[:5]
|
||||||
|
|
||||||
result = await db.execute(
|
result = await db.execute(
|
||||||
f"""
|
f"""
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from .models import CreateWithdrawData, HashCheck, WithdrawLink
|
|||||||
async def create_withdraw_link(
|
async def create_withdraw_link(
|
||||||
data: CreateWithdrawData, wallet_id: str
|
data: CreateWithdrawData, wallet_id: str
|
||||||
) -> WithdrawLink:
|
) -> WithdrawLink:
|
||||||
link_id = urlsafe_short_hash()
|
link_id = urlsafe_short_hash()[:6]
|
||||||
available_links = ",".join([str(i) for i in range(data.uses)])
|
available_links = ",".join([str(i) for i in range(data.uses)])
|
||||||
await db.execute(
|
await db.execute(
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user