diff --git a/src/decorators/render-kxml.ts b/src/decorators/render-kxml.ts index 440a416..b6ce8f2 100644 --- a/src/decorators/render-kxml.ts +++ b/src/decorators/render-kxml.ts @@ -1,14 +1,14 @@ import pug from 'pug'; import { to_bin } from "@kamyu/kbinxml"; -export function kxml(templatePath: string): MethodDecorator { +export function kxml(templatePath: string, encoding: 'UTF-8' | 'SHIFT_JIS' = 'UTF-8'): MethodDecorator { const template = pug.compileFile('templates/' + templatePath + '.pug'); return function (_target, _propertyKey, descriptor) { const orig = descriptor.value as Function; descriptor.value = async function (...args: any[]) { const obj = await orig.apply(this, args); - const xml = '' + template(obj); + const xml = `` + template(obj); console.log(xml); const kxml = to_bin(xml); diff --git a/src/functions/facility/get.ts b/src/functions/facility/get.ts index 19b6fa3..c10d908 100644 --- a/src/functions/facility/get.ts +++ b/src/functions/facility/get.ts @@ -32,8 +32,8 @@ export default class implements ILaochanService { }, portfw: { globalIp: '127.0.0.1', - globalport: 5700, - privateport: 5700, + globalPort: 5700, + privatePort: 5700, }, public: { flag: 0,