add img to bonus and endpoint toogle activation bonus
This commit is contained in:
@ -45,3 +45,12 @@ async def upgrade_user_bonus(username: str = Body(...), bonus_id: str = Body(...
|
||||
from app.services.bonus import BonusService
|
||||
return await BonusService().upgrade_bonus(username, bonus_id)
|
||||
|
||||
@router.post("/toggle-activation")
|
||||
async def toggle_bonus_activation(username: str = Body(...), bonus_id: str = Body(...)):
|
||||
"""
|
||||
Переключить активность бонуса пользователя.
|
||||
Передаём username и bonus_id, is_active переключается на противоположное значение.
|
||||
"""
|
||||
from app.services.bonus import BonusService
|
||||
return await BonusService().toggle_bonus_activation(username, bonus_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user