fix(striker-ui-api): add type number boolean

main
Tsu-ba-me 2 years ago
parent 83d572530b
commit 192e1b82cc
  1. 10
      striker-ui-api/src/lib/request_handlers/anvil/getAnvilDetail.ts
  2. 2
      striker-ui-api/src/types/InsertOrUpdateVariableFunction.d.ts
  3. 1
      striker-ui-api/src/types/NumberBoolean.d.ts

@ -4,8 +4,6 @@ import { RequestHandler } from 'express';
import { getAnvilData, getHostData, query } from '../../accessModule';
import { stderr } from '../../shell';
type DbBoolean = 0 | 1;
const buildHostStateMessage = (postfix = 2) => `message_022${postfix}`;
export const getAnvilDetail: RequestHandler<
@ -63,10 +61,10 @@ export const getAnvilDetail: RequestHandler<
if (hstatus !== 'online') continue;
let rows: [
inCcm: DbBoolean,
crmdMember: DbBoolean,
clusterMember: DbBoolean,
maintenanceMode: DbBoolean,
inCcm: NumberBoolean,
crmdMember: NumberBoolean,
clusterMember: NumberBoolean,
maintenanceMode: NumberBoolean,
][];
try {

@ -1,5 +1,5 @@
type VariableParams = InsertOrUpdateFunctionCommonParams & {
update_value_only?: 0 | 1;
update_value_only?: NumberBoolean;
variable_default?: string;
varaible_description?: string;
variable_name?: string;

@ -0,0 +1 @@
type NumberBoolean = 0 | 1;
Loading…
Cancel
Save