forked from mirrors/pronouns.cc
feat: rename PATCH /users/@me 'username' param to 'name' for consistency
This commit is contained in:
parent
e5ec3dcbeb
commit
136edee506
3 changed files with 2 additions and 2 deletions
|
@ -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"`
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue