mirror of
https://github.com/makayabou/asg-server.git
synced 2026-05-02 17:43:36 +02:00
[handlers] fix inbox export path
This commit is contained in:
parent
0ea8734967
commit
332a6e0a85
@ -246,7 +246,7 @@ func (h *ThirdPartyController) get(user models.User, c *fiber.Ctx) error {
|
||||
// @Failure 400 {object} smsgateway.ErrorResponse "Invalid request"
|
||||
// @Failure 401 {object} smsgateway.ErrorResponse "Unauthorized"
|
||||
// @Failure 500 {object} smsgateway.ErrorResponse "Internal server error"
|
||||
// @Router /3rdparty/v1/inbox/export [post]
|
||||
// @Router /3rdparty/v1/messages/inbox/export [post]
|
||||
//
|
||||
// Export inbox
|
||||
func (h *ThirdPartyController) postInboxExport(user models.User, c *fiber.Ctx) error {
|
||||
|
||||
@ -147,64 +147,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/3rdparty/v1/inbox/export": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Initiates process of inbox messages export via webhooks. For each message the ` + "`" + `sms:received` + "`" + ` webhook will be triggered. The webhooks will be triggered without specific order.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User",
|
||||
"Messages"
|
||||
],
|
||||
"summary": "Request inbox messages export",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Export inbox request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.MessagesExportRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"202": {
|
||||
"description": "Inbox export request accepted",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/3rdparty/v1/logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -439,6 +381,64 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/3rdparty/v1/messages/inbox/export": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Initiates process of inbox messages export via webhooks. For each message the ` + "`" + `sms:received` + "`" + ` webhook will be triggered. The webhooks will be triggered without specific order.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"User",
|
||||
"Messages"
|
||||
],
|
||||
"summary": "Request inbox messages export",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Export inbox request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.MessagesExportRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"202": {
|
||||
"description": "Inbox export request accepted",
|
||||
"schema": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/smsgateway.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/3rdparty/v1/messages/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@ -1368,7 +1368,7 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"passphrase": {
|
||||
"description": "Passphrase is the encryption passphrase. If nil or empty, encryption is disabled.",
|
||||
"description": "Passphrase is the encryption passphrase. If nil or empty, encryption is disabled. Must not be used with Cloud Server.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
@ -1470,7 +1470,7 @@ const docTemplate = `{
|
||||
"minimum": 1
|
||||
},
|
||||
"signing_key": {
|
||||
"description": "SigningKey is the secret key used for signing webhook payloads.",
|
||||
"description": "SigningKey is the secret key used for signing webhook payloads. Must not be used with Cloud Server.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
@ -1546,7 +1546,8 @@ const docTemplate = `{
|
||||
"sms:sent",
|
||||
"sms:delivered",
|
||||
"sms:failed",
|
||||
"system:ping"
|
||||
"system:ping",
|
||||
"mms:received"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"WebhookEventSmsReceived",
|
||||
@ -1554,7 +1555,8 @@ const docTemplate = `{
|
||||
"WebhookEventSmsSent",
|
||||
"WebhookEventSmsDelivered",
|
||||
"WebhookEventSmsFailed",
|
||||
"WebhookEventSystemPing"
|
||||
"WebhookEventSystemPing",
|
||||
"WebhookEventMmsReceived"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user