diff --git a/src/http.ts b/src/http.ts index e51e2a2..ad456a5 100644 --- a/src/http.ts +++ b/src/http.ts @@ -139,6 +139,7 @@ import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse"; import { HidePost } from "./types/HidePost"; import { ListMedia } from "./types/ListMedia"; import { ListMediaResponse } from "./types/ListMediaResponse"; +import { GetRegistrationApplication } from "./types/GetRegistrationApplication"; enum HttpType { Get = "GET", @@ -1330,6 +1331,18 @@ export class LemmyHttp { >(HttpType.Put, "/admin/registration_application/approve", form); } + /** + * Get the application a user submitted when they first registered their account + * + * `HTTP.GET /admin/registration_application` + */ + getRegistrationApplication(form: GetRegistrationApplication) { + return this.#wrapper< + GetRegistrationApplication, + RegistrationApplicationResponse + >(HttpType.Get, "/admin/registration_application", form); + } + /** * Purge / Delete a person from the database. * @@ -1526,7 +1539,7 @@ export class LemmyHttp { try { json = await response.json(); - } catch (error) { + } catch { throw new Error(response.statusText); }