klesh commented on code in PR #2208:
URL: https://github.com/apache/incubator-devlake/pull/2208#discussion_r900303403


##########
plugins/ae/api/connection.go:
##########
@@ -18,88 +18,141 @@ limitations under the License.
 package api
 
 import (
-       "github.com/apache/incubator-devlake/config"
+       "fmt"
+       "net/http"
+       "time"
+
        "github.com/apache/incubator-devlake/plugins/ae/models"
        "github.com/apache/incubator-devlake/plugins/core"
        "github.com/apache/incubator-devlake/plugins/helper"
-       "net/http"
+       "github.com/go-playground/validator/v10"
+       "github.com/mitchellh/mapstructure"
+       "github.com/spf13/viper"
+       "gorm.io/gorm"
 )
 
 type ApiMeResponse struct {
        Name string `json:"name"`
 }
 
-/*
-GET /plugins/ae/test
-*/
-func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, 
error) {
-       // TODO: implement test connection
-       return &core.ApiResourceOutput{Body: true}, nil
+var vld *validator.Validate
+var connectionHelper *helper.ConnectionApiHelper
+
+func Init(config *viper.Viper, logger core.Logger, database *gorm.DB) {
+       basicRes := helper.NewDefaultBasicRes(config, logger, database)
+       vld = validator.New()
+       connectionHelper = helper.NewConnectionHelper(
+               basicRes,
+               vld,
+       )
 }
 
 /*
-PATCH /plugins/ae/connections/:connectionId
+GET /plugins/ae/test/:connectionId

Review Comment:
   The comment doesn't seem correct.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to