This commit is contained in:
Jay 2018-12-11 11:36:52 +08:00
parent 6e4d93d555
commit da0a1cc5a6

View File

@ -2,6 +2,7 @@ package api
import ( import (
"fmt" "fmt"
"log"
"strconv" "strconv"
"git.trj.tw/golang/mtfosbot/model" "git.trj.tw/golang/mtfosbot/model"
@ -129,6 +130,7 @@ func GetCommandList(c *context.Context) {
count, err := model.GetCommandCount(whereMap) count, err := model.GetCommandCount(whereMap)
if err != nil { if err != nil {
log.Println("error :::: ", err)
c.ServerError(nil) c.ServerError(nil)
return return
} }
@ -137,6 +139,7 @@ func GetCommandList(c *context.Context) {
cmds, err := model.GetCommands(whereMap, page.Offset, page.Limit, nil) cmds, err := model.GetCommands(whereMap, page.Offset, page.Limit, nil)
if err != nil { if err != nil {
log.Println("list error :::: ", err)
c.ServerError(nil) c.ServerError(nil)
return return
} }