mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 02:56:10 +00:00
a40ae60abb
- MApiKeysSection: the keys with what each may read, creating one in a sheet (name, the areas as chips, the key shown once with a copy button), deleting behind a confirm sheet, and the endpoint to copy. - The list and every action move from ApiKeysSection into useApiKeys, shared by both views; the calls go through a small online-only apiKeysRepo, so no view reaches the API (offline baseline loses ApiKeysSection and AdminSettingsTab). - The phone's Integrations tab is always there now, as on the desktop: the keys in it need no addon. - A test title no longer breaks on its apostrophe.
13 lines
418 B
TypeScript
13 lines
418 B
TypeScript
import { authApi } from '../api/client';
|
|
|
|
/**
|
|
* Public API keys, deliberately online-only: a key is minted by the server and
|
|
* its secret is shown exactly once, so there is nothing a device could hold or
|
|
* replay offline. The settings views reach them through here, never the API.
|
|
*/
|
|
export const apiKeysRepo = {
|
|
list: authApi.apiKeys.list,
|
|
create: authApi.apiKeys.create,
|
|
delete: authApi.apiKeys.delete,
|
|
};
|