MCPcopy Create free account
hub / github.com/TruthHun/BookStack / Add

Method Add

models/friendlink.go:18–27  ·  view source on GitHub ↗

添加友情链接

(title, link string)

Source from the content-addressed store, hash-verified

16
17//添加友情链接
18func (this *FriendLink) Add(title, link string) (err error) {
19 var fl = FriendLink{
20 Title: title,
21 Link: link,
22 Sort: 0,
23 Status: true,
24 }
25 _, err = orm.NewOrm().Insert(&fl)
26 return
27}
28
29//根据字段更新友链
30func (this *FriendLink) Update(id int, field string, value interface{}) (err error) {

Callers

nothing calls this directly

Calls 1

InsertMethod · 0.45

Tested by

no test coverage detected