From cbb563c4d6f629914cb23cb815e284e82df5b552 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Mon, 28 Apr 2025 23:33:06 +0200 Subject: [PATCH 1/2] fix: change error code from 401 to 403 --- API/client-server/v1/register.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/API/client-server/v1/register.md b/API/client-server/v1/register.md index d50c5ea..b197f72 100644 --- a/API/client-server/v1/register.md +++ b/API/client-server/v1/register.md @@ -32,7 +32,7 @@ Registers the user, and issues an access token for future requests. |-|-| |200|Registration successful| |400|The post request included poorly formated data| -|401|Signups are disabled, gorb ID not available, email already in use, or password doesn't meet the minimum security requirements| +|403|Signups are disabled, gorb ID not available, email already in use, or password doesn't meet the minimum security requirements| --- @@ -54,7 +54,7 @@ Registers the user, and issues an access token for future requests. --- -### 401 +### 403 |Name|Type|Description| |-|-|-| From 2f8a6531489e8ab73e0850455acfe8f44bf521a1 Mon Sep 17 00:00:00 2001 From: JustTemmie <47639983+JustTemmie@users.noreply.github.com> Date: Mon, 28 Apr 2025 23:33:21 +0200 Subject: [PATCH 2/2] feat: implement client-server/friend-request --- API/client-server/v1/friend-request.md | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 API/client-server/v1/friend-request.md diff --git a/API/client-server/v1/friend-request.md b/API/client-server/v1/friend-request.md new file mode 100644 index 0000000..25e2bc7 --- /dev/null +++ b/API/client-server/v1/friend-request.md @@ -0,0 +1,34 @@ +POST /v1/friend-request + +--- + +Sends a friend request to the given user. + +--- + +## Request + +|Name|Type|Description| +|-|-|-| +|access_token|string|**Required**: The user's auth token| +|identifier|string|**Required**: The gorb ID of the user they want to friend| +|message|string|A message to send along with the friend request, for example to find to tell them who you are| + +```json +{ + "access_token": "gwLhWXD9wrqL3DwxXZ0VHUeOjr8am1yO", + "identifier": "@radial_4740:gorb.app", + "message": "Heyo, Kira here" +} +``` + +--- + +## Responses + +|Status|Description| +|-|-| +|200|Friend request sucessfully sent| +|400|The post request included poorly formated data| +|401|The recipient is not accepting friend requests from the sender at the moment| +|403|Invalid access token| \ No newline at end of file