You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package monkey
import (
"goqs/controllers"
"net/http"
"github.com/gin-gonic/gin"
)
// @Tags Monkey相关 /api/monkey/v1/
// @Summary 获取设备列表
// @Description 获取安卓设备列表
// @accept x-www-form-urlencoded
// @Param platform query int false "平台: ios/adr"
// @Success 200 {object} models.Response "返回设备信息"
// @Router /api/monkey/v1/devices [get]
func GetDevices ( c * gin . Context ) {
rsp := controllers . NewResponse ( )
// var list []models.MonkeyDevice
// db, err := dbsql.GetConn(dbsql.DSN)
// if err != nil {
// rsp.Error(err.Error())
// c.JSON(http.StatusOK, rsp)
// return
// }
// defer dbsql.Close(db)
rsp . Success ( )
rsp . Data = GetAndroidDevices ( )
c . JSON ( http . StatusOK , rsp )
}