Avoid to use $.content, Changes on WebUI

* Fix mistake that i was put webui handler on models folder
* Cahnge WebUI name.
This commit is contained in:
DitFranXX
2020-12-11 16:48:03 +09:00
parent e98db72efa
commit 3e43c2196c
4 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -745,25 +745,25 @@ export const savePlayer: EPR = async (info, data, send) => {
const autoSet = (field: keyof Profile, path: string, array = false): void => { const autoSet = (field: keyof Profile, path: string, array = false): void => {
if (array) { if (array) {
profile[field] = dataplayer.content(path, profile[field]) profile[field] = dataplayer.numbers(path, profile[field])
} else { } else {
profile[field] = dataplayer.content(path, profile[field])[0] profile[field] = dataplayer.number(path, profile[field])
} }
}; };
const autoExtra = (field: keyof Extra, path: string, array = false): void => { const autoExtra = (field: keyof Extra, path: string, array = false): void => {
if (array) { if (array) {
extra[field] = dataplayer.content(path, extra[field]) extra[field] = dataplayer.numbers(path, extra[field])
} else { } else {
extra[field] = dataplayer.content(path, extra[field])[0] extra[field] = dataplayer.number(path, extra[field])
} }
}; };
const autoRec = (field: keyof Record, path: string, array = false): void => { const autoRec = (field: keyof Record, path: string, array = false): void => {
if (array) { if (array) {
rec[field] = dataplayer.content(path, rec[field]) rec[field] = dataplayer.numbers(path, rec[field])
} else { } else {
rec[field] = dataplayer.content(path, rec[field])[0] rec[field] = dataplayer.number(path, rec[field])
} }
}; };
+1 -1
View File
@@ -1,7 +1,7 @@
import { gameInfoGet, shopInfoRegist } from "./handlers/info"; import { gameInfoGet, shopInfoRegist } from "./handlers/info";
import { playableMusic } from "./handlers/MusicList" import { playableMusic } from "./handlers/MusicList"
import { getPlayer, check, regist, savePlayer } from "./handlers/profiles"; import { getPlayer, check, regist, savePlayer } from "./handlers/profiles";
import { updatePlayerInfo } from "./models/webui"; import { updatePlayerInfo } from "./handlers/webui";
export function register() { export function register() {
R.GameCode('M32'); R.GameCode('M32');