From dc9e9c11819e1b600742074658ee548e4eea29ea Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Wed, 23 Nov 2022 11:19:38 +0100 Subject: [PATCH 1/3] PUTs now return 201 --- doc/api.yaml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/doc/api.yaml b/doc/api.yaml index f0b723b..60c9738 100644 --- a/doc/api.yaml +++ b/doc/api.yaml @@ -258,8 +258,16 @@ paths: security: - BearerAuth: [] responses: - '204': + '201': description: Ban user action successful. + content: + application/json: + schema: + $ref: "#/components/schemas/generic_response" + example: + status: "Success" + '204': + description: The user is already banned. '403': description: The user has no permission to perform this action. content: @@ -391,8 +399,16 @@ paths: security: - BearerAuth: [] responses: - '204': + '201': description: Like photo action successful. + content: + application/json: + schema: + $ref: "#/components/schemas/generic_response" + example: + status: "Success" + '204': + description: The user already likes the photo. '403': description: The user has no permission to perform this action. content: @@ -768,8 +784,14 @@ paths: example: comment: "Lovely!" responses: - '204': - description: Comment photo action successful. #todo maybe 201 + '201': + description: Comment photo action successful. + content: + application/json: + schema: + $ref: "#/components/schemas/generic_response" + example: + status: "Created" '404': description: The user or the photo does not exists (or the author of the photo has banned the authorized user). content: From f1de5c316f23efc19a623ddb0b8d9702f72b63a5 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Thu, 24 Nov 2022 14:53:30 +0100 Subject: [PATCH 2/3] Rename deleteComment to uncommentPhoto --- doc/api.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api.yaml b/doc/api.yaml index 60c9738..6139f59 100644 --- a/doc/api.yaml +++ b/doc/api.yaml @@ -806,7 +806,7 @@ paths: tags: ["comments"] summary: Deletes a comment description: Deletes a photo in the gallery of the authorized user. - operationId: deleteComment + operationId: uncommentPhoto security: - BearerAuth: [] parameters: From a1bbf6f74d05ff7cb3e07c108fd771717304ccf3 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Thu, 24 Nov 2022 14:54:05 +0100 Subject: [PATCH 3/3] Add .gitignore --- .gitignore | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b3ce1b --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +/bin/ +/pkg/ +/src/ +.idea/ +*.iml +*.exe +.DS_Store +.env +*.wiki.git +docker-compose.log +/doc/html +/doc/json +/doc/markdown \ No newline at end of file