This commit is contained in:
Daniel 2024-03-09 11:26:27 +08:00
parent 77ce08d044
commit 1b0ceaaedf
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 0 additions and 84 deletions

View file

@ -39,49 +39,6 @@ func getMirrorDatabaseBlocks(c *gin.Context) {
ret.Data = av.GetMirrorBlockIDs(avID)
}
func searchTableView(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
arg, _ := util.JsonArg(c, ret)
if nil == arg {
return
}
avID := arg["avID"].(string)
viewID := arg["viewID"].(string)
query := arg["query"].(string)
view, attrView, err := model.SearchTableView(avID, viewID, query)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
return
}
var views []map[string]interface{}
for _, v := range attrView.Views {
view := map[string]interface{}{
"id": v.ID,
"icon": v.Icon,
"name": v.Name,
"hideAttrViewName": v.HideAttrViewName,
"type": v.LayoutType,
}
views = append(views, view)
}
ret.Data = map[string]interface{}{
"name": attrView.Name,
"id": attrView.ID,
"viewType": view.GetType(),
"viewID": view.GetID(),
"views": views,
"view": view,
"isMirror": av.IsMirror(attrView.ID),
}
}
func setDatabaseBlockView(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)