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 { return http_get_async(api_base("_/password-reset-request/create?for_user=" + username)); }, check_request_async(publicId: string): Promise { return http_get_async(api_base("_/password-reset-request/is-valid?id=" + publicId)); }, fulfill_request_async(publicId: string, newPassword: string): Promise { return http_post_async(api_base("_/password-reset-request/fulfill"), {id: publicId, newPassword}); }, };