upd captcha length

This commit is contained in:
2024-06-13 07:03:39 +00:00
parent 480d2fe141
commit e9fa4f2ead

View File

@ -171,7 +171,7 @@ def patch_anon_name(
def get_captcha( def get_captcha(
captcha_id: uuid.UUID, db: Annotated[Session, Depends(get_db)] captcha_id: uuid.UUID, db: Annotated[Session, Depends(get_db)]
) -> BytesIO: ) -> BytesIO:
prompt = "".join(random.choice(CAPTCHA_SYMBOLS) for i in range(6)) prompt = "".join(random.choice(CAPTCHA_SYMBOLS) for i in range(4))
c = models.Captcha(id=captcha_id, prompt=prompt) c = models.Captcha(id=captcha_id, prompt=prompt)
try: try:
db.add(c) db.add(c)