GetConnectionByName @Summary get webhook connection detail by name @Description Get webhook connection detail @Tags plugins/webhook @Success 200 {object} WebhookConnectionResponse @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Error" @Router /plugi
(input *plugin.ApiResourceInput)
| 239 | // @Failure 500 {string} errcode.Error "Internal Error" |
| 240 | // @Router /plugins/webhook/connections/by-name/{connectionName} [GET] |
| 241 | func GetConnectionByName(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 242 | connection := &models.WebhookConnection{} |
| 243 | err := connectionHelper.FirstByName(connection, input.Params) |
| 244 | return getConnection(err, connection) |
| 245 | } |
| 246 | |
| 247 | func getConnection(err errors.Error, connection *models.WebhookConnection) (*plugin.ApiResourceOutput, errors.Error) { |
| 248 | if err != nil { |
nothing calls this directly
no test coverage detected