aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/lib/api/api-tokens/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'code/app/src/lib/api/api-tokens/index.ts')
-rw-r--r--code/app/src/lib/api/api-tokens/index.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/code/app/src/lib/api/api-tokens/index.ts b/code/app/src/lib/api/api-tokens/index.ts
deleted file mode 100644
index 77bfd91..0000000
--- a/code/app/src/lib/api/api-tokens/index.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import {http_delete_async, http_get_async, http_post_async} from "src/lib/api/_fetch";
-import {api_base} from "src/lib/configuration";
-import type {Temporal} from "temporal-polyfill";
-
-export const http_api_tokens = {
- create_token_async(payload: CreateTokenPayload): Promise<Response> {
- return http_post_async(api_base("v1/api-tokens/create"), payload);
- },
- delete_token_async(id: string): Promise<Response> {
- return http_delete_async(api_base("v1/api-tokens/delete?id=" + id));
- },
- get_tokens_async(): Promise<Response> {
- return http_get_async(api_base("v1/api-tokens"))
- },
-};
-
-export type CreateTokenPayload = {
- expiryDate: Temporal.PlainDateTime,
- allowRead: boolean,
- allowCreate: boolean,
- allowUpdate: boolean,
- allowDelete: boolean
-} \ No newline at end of file