fix: correct status code

This commit is contained in:
Reinaldy Rafli 2021-08-04 17:08:06 +07:00
parent 79a8dccd9c
commit e38f36c579
3 changed files with 354 additions and 354 deletions

View File

@ -68,7 +68,7 @@
} }
}, },
"responses": { "responses": {
"200": { "201": {
"description": "Image has been added", "description": "Image has been added",
"content": { "content": {
"application/json": { "application/json": {
@ -385,7 +385,7 @@
} }
}, },
"responses": { "responses": {
"200": { "201": {
"description": "Joke successfully submitted", "description": "Joke successfully submitted",
"content": { "content": {
"application/json": { "application/json": {

View File

@ -47,7 +47,7 @@ paths:
- $ref: '#/components/schemas/request.auth' - $ref: '#/components/schemas/request.auth'
- $ref: '#/components/schemas/request.joke' - $ref: '#/components/schemas/request.joke'
responses: responses:
200: 201:
description: Image has been added description: Image has been added
content: content:
application/json: application/json:
@ -248,7 +248,7 @@ paths:
- image - image
- link - link
responses: responses:
200: 201:
description: Joke successfully submitted description: Joke successfully submitted
content: content:
application/json: application/json:

View File

@ -93,7 +93,7 @@ func SubmitJoke(c *fiber.Ctx) error {
} }
return c. return c.
Status(fiber.StatusOK). Status(fiber.StatusCreated).
JSON(models.ResponseSubmission{ JSON(models.ResponseSubmission{
Message: "Joke submitted. Please wait for a few days for admin to approve your submission.", Message: "Joke submitted. Please wait for a few days for admin to approve your submission.",
Data: submission[0], Data: submission[0],