fix: correct status code
This commit is contained in:
parent
79a8dccd9c
commit
e38f36c579
|
@ -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": {
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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],
|
||||||
|
|
Loading…
Reference in New Issue