diff --git a/striker-ui-api/src/lib/request_handlers/anvil/getAnvilDetail.ts b/striker-ui-api/src/lib/request_handlers/anvil/getAnvilDetail.ts index 3a260e67..024e007b 100644 --- a/striker-ui-api/src/lib/request_handlers/anvil/getAnvilDetail.ts +++ b/striker-ui-api/src/lib/request_handlers/anvil/getAnvilDetail.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 { diff --git a/striker-ui-api/src/types/InsertOrUpdateVariableFunction.d.ts b/striker-ui-api/src/types/InsertOrUpdateVariableFunction.d.ts index 83e5c59c..620ea292 100644 --- a/striker-ui-api/src/types/InsertOrUpdateVariableFunction.d.ts +++ b/striker-ui-api/src/types/InsertOrUpdateVariableFunction.d.ts @@ -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; diff --git a/striker-ui-api/src/types/NumberBoolean.d.ts b/striker-ui-api/src/types/NumberBoolean.d.ts new file mode 100644 index 00000000..c8114f7f --- /dev/null +++ b/striker-ui-api/src/types/NumberBoolean.d.ts @@ -0,0 +1 @@ +type NumberBoolean = 0 | 1;