Skip to content

Commit ab6f994

Browse files
author
Exybore
committed
Changed : Optional fields
1 parent e12e4ff commit ab6f994

File tree

3 files changed

+9
-19
lines changed

3 files changed

+9
-19
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# 🕓 Change log
22

3+
## Changed : Optional fields
4+
5+
**April 9, 2019 :** All the fields in some PATCH requests are now optional, meaning that you can only include fields that you're going to edit.
6+
7+
**Affecting :** [Edit user's profile](resources/User.md#edit-users-profile), [Edit post](resources/Post.md#edit-post).
8+
39
## Added : User's informations with post
410

511
**April 9, 2019 :** when a post is returned, all the users informations are returned.

resources/Post.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,15 @@ Write a new post and publish it. Requires auth and `POST_WRITE` permission.
4040

4141
`GET /posts/{post.url}`
4242

43-
Get one post by its URL. Returns a [post object](#post-object).
43+
Get one post by its URL. Returns a [post object](#post-object) with post's content.
4444

4545
## Edit post
4646

4747
`PATCH /posts/{post-url}`
4848

4949
Edit a post. Requires auth and `POST_WRITE` permission.
5050

51-
### Request body
52-
53-
| Field | Type | Description |
54-
| -------- | ------ | ------------------------------- |
55-
| title | string | post's title |
56-
| banner | string | post's banner |
57-
| category | string | post's category |
58-
| content | string | post's content, markdown format |
51+
**Editable fields :** `title`, `category`, `banner`, `content`.
5952

6053
## Delete post
6154

resources/User.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,7 @@ Get user's informations based on his username. Retuns a [user object](#user-obje
4343

4444
Edit the user's profile informations. Requires auth, and user has to be itself.
4545

46-
### Request body
47-
48-
| Field | Type | Description | Can be null ? |
49-
| ----------- | --------------- | ------------------------------------------ | ------------- |
50-
| displayname | string | "pretty" name to display (2-32 characters) | |
51-
| picture | string | url of the user's profile picture | |
52-
| description | string | user's description, markdown format ||
53-
| biography | string | user's biography ||
54-
| location | string | user's location ||
55-
| socials | list of objects | user's social networks | ✅ (`[]`) |
46+
**Editable fields :** `displayname`, `picture`, `description`, `biography`, `locations`, `socials`.
5647

5748
## Get user's permissions
5849

0 commit comments

Comments
 (0)