SudoSOS Back-end API / service/websocket/pos-relation-helper / getPointOfSaleRelation
Function: getPointOfSaleRelation() ​
ts
function getPointOfSaleRelation(
userId,
token,
pointOfSaleId): Promise<"all" | "organ" | "own">;Determines the relation between a user and a point of sale. Returns 'all' if user is not connected to POS, 'organ' if connected via organ, 'own' if directly connected.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
userId | number | The user ID. |
token | JsonWebToken | The JWT token containing organ information. |
pointOfSaleId | number | The point of sale ID. |
Returns ​
Promise<"all" | "organ" | "own">
The relation: 'all', 'organ', or 'own'.