fb15695dab
Add CPU RAM Status Add Disk Info
22 lines
507 B
Go
22 lines
507 B
Go
package v1
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/IceWhaleTech/CasaOS/model"
|
|
"github.com/IceWhaleTech/CasaOS/pkg/utils/oasis_err"
|
|
"github.com/IceWhaleTech/CasaOS/service"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func GetSearchList(c *gin.Context) {
|
|
key := c.DefaultQuery("key", "")
|
|
if len(key) == 0 {
|
|
return
|
|
}
|
|
list, err := service.MyService.Search().SearchList(key)
|
|
if err != nil {
|
|
|
|
}
|
|
c.JSON(http.StatusOK, model.Result{Success: oasis_err.SUCCESS, Message: oasis_err.GetMsg(oasis_err.SUCCESS), Data: list})
|
|
}
|