MCPcopy Index your code
hub / github.com/TruthHun/BookStack / Insert

Method Insert

models/api.go:44–54  ·  view source on GitHub ↗
(token string, uid int)

Source from the content-addressed store, hash-verified

42}
43
44func (m *Auth) Insert(token string, uid int) (err error) {
45 m.DeleteByToken(token)
46 var auth = Auth{Token: token, Uid: uid}
47 _, err = orm.NewOrm().Insert(&auth)
48 if err != nil {
49 beego.Error(err.Error())
50 return
51 }
52 m.clearMoreThanLimit(uid)
53 return
54}
55
56func (m *Auth) clearMoreThanLimit(uid int) {
57 if maxLoginTerminal <= 0 {

Callers 15

OauthMethod · 0.45
AdsMethod · 0.45
UploadBannerMethod · 0.45
loginMethod · 0.45
AddMigrationRecordMethod · 0.45
addLoggerAsyncFunction · 0.45
StarMethod · 0.45
InsertOrUpdateMethod · 0.45
InsertOrUpdateMethod · 0.45
SignMethod · 0.45
ListsMethod · 0.45
InsertOrUpdateMethod · 0.45

Calls 2

DeleteByTokenMethod · 0.95
clearMoreThanLimitMethod · 0.95

Tested by

no test coverage detected