mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 00:24:58 +00:00
Use API error helpers and improve response codes (#2366)
This commit is contained in:
@@ -605,7 +605,7 @@ const docTemplate = `{
|
||||
},
|
||||
"/healthz": {
|
||||
"get": {
|
||||
"description": "If everything is fine, just a 200 will be returned, a 500 signals server state is unhealthy.",
|
||||
"description": "If everything is fine, just a 204 will be returned, a 500 signals server state is unhealthy.",
|
||||
"produces": [
|
||||
"text/plain"
|
||||
],
|
||||
@@ -614,8 +614,8 @@ const docTemplate = `{
|
||||
],
|
||||
"summary": "Health information",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error"
|
||||
@@ -869,7 +869,7 @@ const docTemplate = `{
|
||||
"delete": {
|
||||
"description": "Deletes the given org. Requires admin rights.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"Orgs"
|
||||
@@ -894,10 +894,7 @@ const docTemplate = `{
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Org"
|
||||
}
|
||||
"description": "No Content"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1838,8 +1835,8 @@ const docTemplate = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1928,8 +1925,8 @@ const docTemplate = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2667,8 +2664,8 @@ const docTemplate = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3307,7 +3304,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"User"
|
||||
],
|
||||
"summary": "Return the token of the current user as stringª",
|
||||
"summary": "Return the token of the current user as string",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -3473,7 +3470,7 @@ const docTemplate = `{
|
||||
"delete": {
|
||||
"description": "Deletes the given user. Requires admin rights.",
|
||||
"produces": [
|
||||
"application/json"
|
||||
"text/plain"
|
||||
],
|
||||
"tags": [
|
||||
"Users"
|
||||
@@ -3497,11 +3494,8 @@ const docTemplate = `{
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/User"
|
||||
}
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user