mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 10:39:59 +01:00
black formatting
This commit is contained in:
parent
33b48341f1
commit
f6010bc139
@ -71,10 +71,11 @@ async def get_subdomain(subdomain_id: str) -> Optional[Subdomains]:
|
||||
print(row)
|
||||
return Subdomains(**row) if row else None
|
||||
|
||||
|
||||
async def get_subdomainBySubdomain(subdomain: str) -> Optional[Subdomains]:
|
||||
row = await db.fetchone(
|
||||
"SELECT s.*, d.domain as domain_name FROM subdomain s INNER JOIN domain d ON (s.domain = d.id) WHERE s.subdomain = ?",
|
||||
(subdomain, ),
|
||||
(subdomain,),
|
||||
)
|
||||
print(row)
|
||||
return Subdomains(**row) if row else None
|
||||
|
@ -19,7 +19,7 @@ from .crud import (
|
||||
get_domain,
|
||||
get_domains,
|
||||
delete_domain,
|
||||
get_subdomainBySubdomain
|
||||
get_subdomainBySubdomain,
|
||||
)
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ async def api_subdomain_make_subdomain(domain_id):
|
||||
HTTPStatus.BAD_REQUEST,
|
||||
)
|
||||
|
||||
if ( await get_subdomainBySubdomain(g.data["subdomain"]) is not None):
|
||||
if await get_subdomainBySubdomain(g.data["subdomain"]) is not None:
|
||||
return (
|
||||
jsonify({"message": g.data["subdomain"] + "." + domain.domain + " domain already taken"}),
|
||||
HTTPStatus.BAD_REQUEST,
|
||||
|
Loading…
Reference in New Issue
Block a user