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": {
"200": {
"201": {
"description": "Image has been added",
"content": {
"application/json": {
@ -385,7 +385,7 @@
}
},
"responses": {
"200": {
"201": {
"description": "Joke successfully submitted",
"content": {
"application/json": {

View File

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

View File

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