Skip to content

Commit

Permalink
Practice: Register endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed Apr 14, 2024
1 parent 03d8e35 commit 4cb550b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion npps4/game/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ async def unit_sale(context: idol.SchoolIdolUserParams, request: UnitSaleRequest
)


async def unit_merge(context: idol.SchoolIdolUserParams, request: UnitMergeRequest):
@idol.register("unit", "merge", batchable=False)
async def unit_merge(context: idol.SchoolIdolUserParams, request: UnitMergeRequest) -> UnitMergeResponse:
current_user = await user.get_current(context)
before_user = await user.get_user_info(context, current_user)
source_unit = await unit.get_unit(context, request.base_owning_unit_user_id)
Expand Down

0 comments on commit 4cb550b

Please sign in to comment.