mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-22 22:18:02 +02:00
add admin API email endpoints (#22792)
add email endpoint to admin API to ensure API parity with admin dashboard.
This commit is contained in:
@ -138,6 +138,80 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/emails": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "List all emails",
|
||||
"operationId": "adminGetAllEmails",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page number of results to return (1-based)",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page size of results",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/EmailList"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/emails/search": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "Search all emails",
|
||||
"operationId": "adminSearchEmails",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "keyword",
|
||||
"name": "q",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page number of results to return (1-based)",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "page size of results",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/EmailList"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbidden"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/hooks": {
|
||||
"get": {
|
||||
"produces": [
|
||||
@ -16999,6 +17073,15 @@
|
||||
"type": "boolean",
|
||||
"x-go-name": "Primary"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"x-go-name": "UserID"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"x-go-name": "UserName"
|
||||
},
|
||||
"verified": {
|
||||
"type": "boolean",
|
||||
"x-go-name": "Verified"
|
||||
|
Reference in New Issue
Block a user