formatting
This commit is contained in:
@@ -2,6 +2,7 @@ import secrets
|
||||
from http import HTTPStatus
|
||||
|
||||
from fastapi.params import Depends, Query
|
||||
from loguru import logger
|
||||
from starlette.exceptions import HTTPException
|
||||
from starlette.requests import Request
|
||||
|
||||
@@ -13,22 +14,20 @@ from .crud import (
|
||||
create_card,
|
||||
create_hit,
|
||||
delete_card,
|
||||
enable_disable_card,
|
||||
get_card,
|
||||
get_card_by_otp,
|
||||
get_card_by_uid,
|
||||
get_cards,
|
||||
get_hits,
|
||||
get_refunds,
|
||||
update_card,
|
||||
update_card_counter,
|
||||
update_card_otp,
|
||||
enable_disable_card,
|
||||
get_refunds,
|
||||
)
|
||||
from .models import CreateCardData
|
||||
from .nxp424 import decryptSUN, getSunMAC
|
||||
|
||||
from loguru import logger
|
||||
|
||||
|
||||
@boltcards_ext.get("/api/v1/cards")
|
||||
async def api_cards(
|
||||
@@ -77,7 +76,8 @@ async def api_card_create_or_update(
|
||||
checkUid = await get_card_by_uid(data.uid)
|
||||
if checkUid:
|
||||
raise HTTPException(
|
||||
detail="UID already registered. Delete registered card and try again.", status_code=HTTPStatus.BAD_REQUEST
|
||||
detail="UID already registered. Delete registered card and try again.",
|
||||
status_code=HTTPStatus.BAD_REQUEST,
|
||||
)
|
||||
if card_id:
|
||||
card = await get_card(card_id)
|
||||
|
||||
Reference in New Issue
Block a user