Fix update validations (#30)

* fix: no `username` update
* fix: update for old pay_links
* chore: code format
This commit is contained in:
Vlad Stan 2023-11-02 16:09:32 +02:00 committed by GitHub
commit 257f5d34d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 252 additions and 94 deletions

View file

@ -1,7 +1,6 @@
import json
from asyncio.log import logger
from http import HTTPStatus
from urllib.parse import urlparse
from fastapi import Depends, Query, Request
from lnurl.exceptions import InvalidUrl as LnurlInvalidUrl
@ -89,7 +88,6 @@ async def api_link_create_or_update(
link_id=None,
wallet: WalletTypeInfo = Depends(get_key_type),
):
if data.min > data.max:
raise HTTPException(
detail="Min is greater than max.", status_code=HTTPStatus.BAD_REQUEST