Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/user visibility #3

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,124 @@ const docTemplate = `{
}
}
},
"/users/{id}/makeInvisible": {
"post": {
"description": "Makes a user invisible to other users based on the given user ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Make a user invisible to other given users",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Other users",
"name": "otherUsers",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.OtherUsers"
}
}
],
"responses": {
"200": {
"description": "User visibility updated",
"schema": {
"type": "string"
}
},
"400": {
"description": "Error: Invalid user ID",
"schema": {
"type": "string"
}
},
"404": {
"description": "Error: User not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "Error: Internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/users/{id}/makeVisible": {
"post": {
"description": "Makes a user visible to other users based on the given user ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Make a user visible to other given users",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Other users",
"name": "otherUsers",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.OtherUsers"
}
}
],
"responses": {
"200": {
"description": "User visibility updated",
"schema": {
"type": "string"
}
},
"400": {
"description": "Error: Invalid user ID",
"schema": {
"type": "string"
}
},
"404": {
"description": "Error: User not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "Error: Internal server error",
"schema": {
"type": "string"
}
}
}
}
},
"/users/{id}/matches": {
"get": {
"description": "Finds users with matching interests based on the given user ID",
Expand Down Expand Up @@ -175,15 +293,79 @@ const docTemplate = `{
}
}
}
},
"/users/{id}/updateVisibility": {
"post": {
"description": "Makes a user visible or invisible to all other users based on the given user ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Users"
],
"summary": "Make a user visibility to all other users",
"parameters": [
{
"type": "string",
"description": "User ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "User visibility updated",
"schema": {
"type": "string"
}
},
"400": {
"description": "Error: Invalid user ID",
"schema": {
"type": "string"
}
},
"404": {
"description": "Error: User not found",
"schema": {
"type": "string"
}
},
"500": {
"description": "Error: Internal server error",
"schema": {
"type": "string"
}
}
}
}
}
},
"definitions": {
"handlers.OtherUsers": {
"type": "object",
"properties": {
"otherUsers": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"models.User": {
"type": "object",
"properties": {
"age": {
"type": "integer"
},
"anonymous": {
"type": "boolean"
},
"gender": {
"type": "string"
},
Expand All @@ -195,6 +377,12 @@ const docTemplate = `{
},
"name": {
"type": "string"
},
"usersVisibility": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
Expand Down
Loading