From 2a6123c35ead98609e069da8c4bcc7ebfc7b0358 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 29 Nov 2024 12:47:57 +0100 Subject: [PATCH] fix user endpoints --- src/http.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/http.ts b/src/http.ts index b636911..19330ac 100644 --- a/src/http.ts +++ b/src/http.ts @@ -262,7 +262,7 @@ export class LemmyHttp { /** * Generate a TOTP / two-factor secret. * - * Afterwards you need to call `/user/totp/update` with a valid token to enable it. + * Afterwards you need to call `/account/auth/totp/update` with a valid token to enable it. * * `HTTP.POST /account/auth/totp/generate` */ @@ -321,12 +321,12 @@ export class LemmyHttp { /** * List login tokens for your user * - * `HTTP.GET /user/list_logins` + * `HTTP.GET /account/list_logins` */ listLogins(options?: RequestOptions) { return this.#wrapper( HttpType.Get, - "/user/list_logins", + "/account/list_logins", {}, options, ); @@ -335,12 +335,12 @@ export class LemmyHttp { /** * Returns an error message if your auth token is invalid * - * `HTTP.GET /user/validate_auth` + * `HTTP.GET /account/validate_auth` */ validateAuth(options?: RequestOptions) { return this.#wrapper( HttpType.Get, - "/user/validate_auth", + "/account/validate_auth", {}, options, ); @@ -377,7 +377,7 @@ export class LemmyHttp { /** * Enable / Disable TOTP / two-factor authentication. * - * To enable, you need to first call `/user/totp/generate` and then pass a valid token to this. + * To enable, you need to first call `/account/auth/totp/generate` and then pass a valid token to this. * * Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token. * @@ -1263,12 +1263,12 @@ export class LemmyHttp { /** * Get mentions for your user. * - * `HTTP.GET /user/mention` + * `HTTP.GET /account/mention` */ getPersonMentions(form: GetPersonMentions, options?: RequestOptions) { return this.#wrapper( HttpType.Get, - "/user/mention", + "/account/mention", form, options, ); @@ -1308,12 +1308,12 @@ export class LemmyHttp { /** * Get comment replies. * - * `HTTP.GET /user/replies` + * `HTTP.GET /account/replies` */ getReplies(form: GetReplies, options?: RequestOptions) { return this.#wrapper( HttpType.Get, - "/user/replies", + "/account/replies", form, options, ); @@ -1451,12 +1451,12 @@ export class LemmyHttp { /** * Change your user password. * - * `HTTP.PUT /user/change_password` + * `HTTP.PUT /account/auth/change_password` */ changePassword(form: ChangePassword, options?: RequestOptions) { return this.#wrapper( HttpType.Put, - "/user/change_password", + "/account/auth/change_password", form, options, ); @@ -1465,12 +1465,12 @@ export class LemmyHttp { /** * Get counts for your reports * - * `HTTP.GET /user/report_count` + * `HTTP.GET /account/report_count` */ getReportCount(form: GetReportCount, options?: RequestOptions) { return this.#wrapper( HttpType.Get, - "/user/report_count", + "/account/report_count", form, options, ); @@ -1479,12 +1479,12 @@ export class LemmyHttp { /** * Get your unread counts * - * `HTTP.GET /user/unread_count` + * `HTTP.GET /account/unread_count` */ getUnreadCount(options?: RequestOptions) { return this.#wrapper( HttpType.Get, - "/user/unread_count", + "/account/unread_count", {}, options, );