add api line router

This commit is contained in:
Jay
2018-10-14 21:16:58 +08:00
parent 0b8aeee181
commit 31dcbe81bb
4 changed files with 90 additions and 54 deletions
+9
View File
@@ -51,6 +51,15 @@ func GetLineGroup(id string) (g *LineGroup, err error) {
return
}
// GetLineGroupList -
func GetLineGroupList() (ls []*LineGroup, err error) {
err = x.Select(&ls, `select * from "public"."line_group" order by "name"`)
if err == sql.ErrNoRows {
return nil, nil
}
return
}
// AddLineGroup -
func AddLineGroup(name, owner string, notify bool) (g *LineGroup, err error) {
g = &LineGroup{}