1
0
mirror of synced 2024-12-05 03:27:57 +01:00

forgot something

This commit is contained in:
anthonyng43 2024-08-04 22:13:06 +08:00
parent c3750b86e1
commit 897a279a33
2 changed files with 9 additions and 1 deletions

View File

@ -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),

View File

@ -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),