Addition to (Add Location, Website and Description to API #15675) (#15690)

* Use same name as other structs.

* Sync with normal forms.

* Edit description with API.

* Workaround for nil value.
This commit is contained in:
KN4CK3R 2021-05-02 21:03:15 +02:00 committed by GitHub
parent 0590176a23
commit 8c8471e754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 14 deletions

View file

@ -37,8 +37,8 @@ type User struct {
Location string `json:"location"`
// the user's website
Website string `json:"website"`
// the user's biography
Description string `json:"bio"`
// the user's description
Description string `json:"description"`
}
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility