aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/lib/api
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-11-17 07:48:54 +0100
committerivarlovlie <git@ivarlovlie.no>2022-11-17 07:48:54 +0100
commit0a3ca92417d9d0c293469c9d1777f78328c31720 (patch)
tree356d6fd82f482bf9b4216626a02e1709f41c2dde /code/app/src/lib/api
parentcfbdb4b5572c0e95fed3268fa818bc5c700fb30a (diff)
downloadgreatoffice-0a3ca92417d9d0c293469c9d1777f78328c31720.tar.xz
greatoffice-0a3ca92417d9d0c293469c9d1777f78328c31720.zip
feat: Move password reset logic and http calls into a service
Diffstat (limited to 'code/app/src/lib/api')
-rw-r--r--code/app/src/lib/api/password-reset-request/index.ts14
1 files changed, 0 insertions, 14 deletions
diff --git a/code/app/src/lib/api/password-reset-request/index.ts b/code/app/src/lib/api/password-reset-request/index.ts
deleted file mode 100644
index 53cb1d2..0000000
--- a/code/app/src/lib/api/password-reset-request/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import {api_base} from "$lib/configuration";
-import {http_get_async, http_post_async} from "../_fetch";
-
-export const http_password_reset_request = {
- create_request_async(username: string): Promise<Response> {
- return http_get_async(api_base("_/password-reset-request/create?for_user=" + username));
- },
- check_request_async(publicId: string): Promise<Response> {
- return http_get_async(api_base("_/password-reset-request/is-valid?id=" + publicId));
- },
- fulfill_request_async(publicId: string, newPassword: string): Promise<Response> {
- return http_post_async(api_base("_/password-reset-request/fulfill"), {id: publicId, newPassword});
- },
-}; \ No newline at end of file