feat: rename PATCH /users/@me 'username' param to 'name' for consistency

This commit is contained in:
Sam 2023-04-26 13:15:57 +02:00
parent e5ec3dcbeb
commit 136edee506
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
3 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import (
) )
type PatchUserRequest struct { type PatchUserRequest struct {
Username *string `json:"username"` Username *string `json:"name"`
DisplayName *string `json:"display_name"` DisplayName *string `json:"display_name"`
Bio *string `json:"bio"` Bio *string `json:"bio"`
MemberTitle *string `json:"member_title"` MemberTitle *string `json:"member_title"`

View File

@ -29,7 +29,7 @@
const changeUsername = async () => { const changeUsername = async () => {
try { try {
const resp = await apiFetchClient<MeUser>("/users/@me", "PATCH", { username }); const resp = await apiFetchClient<MeUser>("/users/@me", "PATCH", { name: username });
data.user = resp; data.user = resp;
userStore.set(resp); userStore.set(resp);