docs
This commit is contained in:
50
API.companysetting.md
Normal file
50
API.companysetting.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# companysetting
|
||||
|
||||
This document is auto-generated from the JSDoc comments in `src/store` by running `npm run api-doc`.
|
||||
|
||||
## `companysetting.delete`
|
||||
|
||||
*Source: `src/store/companysetting/delete.js`*
|
||||
|
||||
Deletes a company setting by key.
|
||||
|
||||
```js
|
||||
const fn = del(pool);
|
||||
await fn(42, 1, 'theme');
|
||||
```
|
||||
|
||||
## `companysetting.get`
|
||||
|
||||
*Source: `src/store/companysetting/get.js`*
|
||||
|
||||
Returns a single company setting by key.
|
||||
|
||||
```js
|
||||
const fn = get(pool);
|
||||
const setting = await fn(42, 1, 'theme');
|
||||
// => { key, value, frontend }
|
||||
```
|
||||
|
||||
## `companysetting.list`
|
||||
|
||||
*Source: `src/store/companysetting/list.js`*
|
||||
|
||||
Lists the settings of a company, optionally only frontend-visible ones.
|
||||
|
||||
```js
|
||||
const fn = list(pool);
|
||||
const settings = await fn(42, 1, { frontendOnly: true });
|
||||
// => [{ key, value, frontend }]
|
||||
```
|
||||
|
||||
## `companysetting.set`
|
||||
|
||||
*Source: `src/store/companysetting/set.js`*
|
||||
|
||||
Sets (upserts) a company setting by key.
|
||||
|
||||
```js
|
||||
const fn = set(pool);
|
||||
const setting = await fn(42, 1, { key: 'theme', value: 'dark', frontend: true });
|
||||
// => { key, value, frontend }
|
||||
```
|
||||
Reference in New Issue
Block a user