Feature: Add ability to rename and delete tags globally

This commit is contained in:
Ralph Slooten
2024-06-29 17:12:56 +12:00
parent 0dca8df29c
commit 0c377b9616
14 changed files with 438 additions and 23 deletions

View File

@@ -703,6 +703,79 @@
}
}
},
"/api/v1/tags/{tag}": {
"put": {
"description": "Renames a tag.",
"produces": [
"text/plain"
],
"schemes": [
"http",
"https"
],
"tags": [
"tags"
],
"summary": "Rename a tag",
"operationId": "RenameTag",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/renameTagRequestBody"
}
},
{
"type": "string",
"description": "The url-encoded tag name to rename",
"name": "tag",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/OKResponse"
},
"default": {
"$ref": "#/responses/ErrorResponse"
}
}
},
"delete": {
"description": "Deletes a tag. This will not delete any messages with this tag.",
"produces": [
"text/plain"
],
"schemes": [
"http",
"https"
],
"tags": [
"tags"
],
"summary": "Delete a tag",
"operationId": "DeleteTag",
"parameters": [
{
"type": "string",
"description": "The url-encoded tag name to delete",
"name": "tag",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/OKResponse"
},
"default": {
"$ref": "#/responses/ErrorResponse"
}
}
}
},
"/api/v1/webui": {
"get": {
"description": "Returns configuration settings for the web UI.\nIntended for web UI only!",
@@ -1690,6 +1763,21 @@
},
"x-go-package": "github.com/axllent/mailpit/server/apiv1"
},
"renameTagRequestBody": {
"description": "Rename tag request",
"type": "object",
"required": [
"Name"
],
"properties": {
"Name": {
"description": "New name",
"type": "string",
"example": "New name"
}
},
"x-go-package": "github.com/axllent/mailpit/server/apiv1"
},
"setReadStatusRequestBody": {
"description": "Set read status request",
"type": "object",