39 lines
717 B
Markdown
39 lines
717 B
Markdown
# companyuser
|
|
|
|
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
|
|
|
## `companyuser.add`
|
|
|
|
*Source: `src/store/companyuser/add.js`*
|
|
|
|
Adds a company user linking a company to a Google auth account.
|
|
|
|
```js
|
|
const fn = add(pool);
|
|
const id = await fn(1, 42);
|
|
// => 7
|
|
```
|
|
|
|
## `companyuser.delete`
|
|
|
|
*Source: `src/store/companyuser/delete.js`*
|
|
|
|
Deletes a company user link by its id.
|
|
|
|
```js
|
|
const fn = del(pool);
|
|
await fn(7);
|
|
```
|
|
|
|
## `companyuser.getByEmail`
|
|
|
|
*Source: `src/store/companyuser/getByEmail.js`*
|
|
|
|
Returns the company user ids associated with the given email address.
|
|
|
|
```js
|
|
const fn = getByEmail(pool);
|
|
const ids = await fn('user@example.com');
|
|
// => [1, 2, 3]
|
|
```
|