feat: Update endpoint something-new
This commit is contained in:
parent
734d7950d4
commit
2ca0f0582d
@ -0,0 +1,14 @@
|
|||||||
|
import random
|
||||||
|
import string
|
||||||
|
|
||||||
|
from fastapi import APIRouter, HTTPException
|
||||||
|
|
||||||
|
router = APIRouter()
|
||||||
|
|
||||||
|
@router.post("/generate-selection-code", response_model=str)
|
||||||
|
async def generate_selection_code():
|
||||||
|
"""
|
||||||
|
Generate a random selection code
|
||||||
|
"""
|
||||||
|
selection_code = ''.join(random.choices(string.ascii_uppercase + string.digits, k=6))
|
||||||
|
return selection_code
|
Loading…
x
Reference in New Issue
Block a user