fix(striker-ui-api): correct query to get host uuid in server power handler

main
Tsu-ba-me 9 months ago
parent 91dd5d37a1
commit dbc4bf933e
  1. 5
      striker-ui-api/src/lib/request_handlers/command/buildPowerHandler.ts

@ -184,7 +184,10 @@ export const buildServerPowerHandler: (
try { try {
const rows = await query<[[null | string]]>( const rows = await query<[[null | string]]>(
`SELECT server_host_uuid FROM servers WHERE server_uuid = '${uuid}' server_state != '${DELETED}';`, `SELECT server_host_uuid
FROM servers
WHERE server_uuid = '${uuid}'
AND server_state != '${DELETED}';`,
); );
assert.ok(rows.length, `No entry found`); assert.ok(rows.length, `No entry found`);

Loading…
Cancel
Save