TestConnection test feishu connection @Summary test feishu connection @Description Test feishu Connection. endpoint: https://open.feishu.cn/open-apis/ @Tags plugins/feishu @Param body body models.FeishuConn true "json body" @Success 200 {object} FeishuTestConnResponse "Success" @Failure 400 {strin
(input *plugin.ApiResourceInput)
| 64 | // @Failure 500 {string} errcode.Error "Internal Error" |
| 65 | // @Router /plugins/feishu/test [POST] |
| 66 | func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput, errors.Error) { |
| 67 | // process input |
| 68 | var connection models.FeishuConn |
| 69 | if err := api.Decode(input.Body, &connection, vld); err != nil { |
| 70 | return nil, errors.BadInput.Wrap(err, "could not decode request parameters") |
| 71 | } |
| 72 | // test connection |
| 73 | result, err := testConnection(context.TODO(), connection) |
| 74 | if err != nil { |
| 75 | return nil, plugin.WrapTestConnectionErrResp(basicRes, err) |
| 76 | } |
| 77 | return &plugin.ApiResourceOutput{Body: result, Status: http.StatusOK}, nil |
| 78 | } |
| 79 | |
| 80 | // TestExistingConnection test feishu connection |
| 81 | // @Summary test feishu connection |
nothing calls this directly
no test coverage detected