From 612994167626b21a6b6437656575666148c49b3b527def9f438c08c98771d0d9 Mon Sep 17 00:00:00 2001 From: aslan Date: Sat, 27 Dec 2025 00:09:46 +0100 Subject: [PATCH] Rework patches --- docs/api/community.md | 31 +++++-------------------------- docs/api/user.md | 31 +++++-------------------------- 2 files changed, 10 insertions(+), 52 deletions(-) diff --git a/docs/api/community.md b/docs/api/community.md index 45482a8..207c1f7 100644 --- a/docs/api/community.md +++ b/docs/api/community.md @@ -13,7 +13,7 @@ Returns a community with id = {id} } ``` -## UPDATE /api/v1/community/{id}/name +## PATCH /api/v1/community/{id} _Requires an authorization header_ @@ -21,40 +21,19 @@ _Requires an authorization header_ ```json { - "name": "string" + "name": "string?", + "description": "string?" } ``` -Updates name for a community with id = {id} - -### Response: - -```json -{ - "id": "string", - "name": "string" -} -``` - -## PATCH /api/v1/community/{id}/description - -_Requires an authorization header_ - -### Request: - -```json -{ - "description": "string" -} -``` - -Updates description for a community with id = {id} +Updates a community with id = {id} ### Response: ```json { "id": "string", + "name": "string", "description": "string" } ``` diff --git a/docs/api/user.md b/docs/api/user.md index 5bd2416..2ab5433 100644 --- a/docs/api/user.md +++ b/docs/api/user.md @@ -37,7 +37,7 @@ Returns all sessions for a user with id = {id} } ``` -## PATCH /api/v1/user/{id}/email +## PATCH /api/v1/user/{id} _Requires an authorization header_ @@ -45,40 +45,19 @@ _Requires an authorization header_ ```json { - "email": "string" + "email": "string?", + "description": "string?" } ``` -Updates email for a user with id = {id} - -### Response: - -```json -{ - "id": "string", - "email": "string" -} -``` - -## PATCH /api/v1/user/{id}/description - -_Requires an authorization header_ - -### Request: - -```json -{ - "description": "string" -} -``` - -Updates description for a user with id = {id} +Updates a user with id = {id} ### Response: ```json { "id": "string", + "email": "string", "description": "string" } ```