material in prank
This commit is contained in:
@ -27,6 +27,7 @@ class PrankService:
|
||||
"name": command_data.name,
|
||||
"description": command_data.description,
|
||||
"price": command_data.price,
|
||||
"material": command_data.get("material"),
|
||||
"command_template": command_data.command_template,
|
||||
"server_ids": command_data.server_ids,
|
||||
"targetDescription": command_data.targetDescription,
|
||||
@ -49,6 +50,7 @@ class PrankService:
|
||||
"name": cmd["name"],
|
||||
"description": cmd["description"],
|
||||
"price": cmd["price"],
|
||||
"material": cmd.get("material"),
|
||||
"command_template": cmd["command_template"],
|
||||
"server_ids": cmd.get("server_ids", []),
|
||||
"targetDescription": cmd.get("targetDescription"),
|
||||
@ -68,6 +70,7 @@ class PrankService:
|
||||
"name": command["name"],
|
||||
"description": command["description"],
|
||||
"price": command["price"],
|
||||
"material": command.get("material"),
|
||||
"command_template": command["command_template"],
|
||||
"server_ids": command.get("server_ids", []),
|
||||
"targetDescription": command.get("targetDescription"),
|
||||
@ -88,6 +91,8 @@ class PrankService:
|
||||
update["description"] = update_data.description
|
||||
if update_data.price is not None:
|
||||
update["price"] = update_data.price
|
||||
if update_data.material is not None:
|
||||
update["material"] = update_data.material
|
||||
if update_data.command_template is not None:
|
||||
if "{targetPlayer}" not in update_data.command_template:
|
||||
raise HTTPException(status_code=400,
|
||||
|
||||
Reference in New Issue
Block a user