forgot something
This commit is contained in:
parent
c3750b86e1
commit
897a279a33
@ -597,7 +597,6 @@ export async function updateCar(body: wm.protobuf.UpdateCarRequest)
|
||||
{
|
||||
// Car update data
|
||||
data = {
|
||||
name: common.sanitizeInput(cars.name),
|
||||
customColor: common.sanitizeInput(cars.customColor),
|
||||
wheel: common.sanitizeInput(cars.wheel),
|
||||
wheelColor: common.sanitizeInput(cars.wheelColor),
|
||||
|
@ -8,6 +8,7 @@ import wmproto from "../../wmmt/wm.proto";
|
||||
import * as common from "../util/common";
|
||||
import * as ghost_history from "../ghost/ghost_history";
|
||||
import * as ghost_stamp from "../ghost/ghost_stamp";
|
||||
import * as carFunctions from "../cars/functions";
|
||||
|
||||
// Save ghost battle result
|
||||
export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequest, car: any)
|
||||
@ -55,6 +56,14 @@ export async function saveGhostBattleResult(body: wm.protobuf.SaveGameResultRequ
|
||||
cars.wing = 127
|
||||
}
|
||||
|
||||
// check for car name before update new name
|
||||
let isSlur = await carFunctions.checkNameInput(body);
|
||||
if (isSlur.slurName === true) {
|
||||
cars.name = car.name
|
||||
} else {
|
||||
cars.name = cars.name
|
||||
}
|
||||
|
||||
// Car update data
|
||||
dataCar = {
|
||||
name: common.sanitizeInput(cars.name),
|
||||
|
Loading…
Reference in New Issue
Block a user