You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
402 B
18 lines
402 B
from fastapi import APIRouter
|
|
from helper import respond_to
|
|
from helper.Balance import balance
|
|
|
|
router = APIRouter(prefix='/balance')
|
|
|
|
|
|
@router.get('/get_balance',summary='获取重量')
|
|
async def get_balance():
|
|
data = balance.getData()
|
|
return respond_to(data=data)
|
|
|
|
|
|
@router.get('/get_tare',summary='去皮')
|
|
async def get_tare():
|
|
balance.tare()
|
|
return respond_to(desc='去皮成功')
|