fix(striker-ui-api): add optional local host UUID in toHostUUID()

main
Tsu-ba-me 2 years ago
parent e394b0736e
commit e20a3a4af1
  1. 6
      striker-ui-api/src/lib/convertHostUUID.ts

@ -2,8 +2,10 @@ import { LOCAL } from './consts/LOCAL';
import { getLocalHostUUID } from './accessModule';
export const toHostUUID = (hostUUID: string) =>
hostUUID === LOCAL ? getLocalHostUUID() : hostUUID;
export const toHostUUID = (
hostUUID: string,
localHostUUID: string = getLocalHostUUID(),
) => (hostUUID === LOCAL ? localHostUUID : hostUUID);
export const toLocal = (
hostUUID: string,

Loading…
Cancel
Save