MCPcopy Index your code
hub / github.com/apache/devlake / TestConnection

Function TestConnection

backend/plugins/feishu/api/connection.go:66–78  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

64// @Failure 500 {string} errcode.Error "Internal Error"
65// @Router /plugins/feishu/test [POST]
66func 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

Callers

nothing calls this directly

Calls 2

WrapMethod · 0.80
testConnectionFunction · 0.70

Tested by

no test coverage detected