mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-22 12:21:12 +00:00
Another endpoint.
This commit is contained in:
parent
95946cc50a
commit
36123c8cc9
1 changed files with 14 additions and 1 deletions
15
src/http.ts
15
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue