mirror of
https://github.com/lnbits/lnbits.git
synced 2025-07-28 13:42:42 +02:00
black formatting
This commit is contained in:
@@ -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,
|
||||
|
Reference in New Issue
Block a user