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

Method SignToday

controllers/BaseController.go:572–581  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

570}
571
572func (this *BaseController) SignToday() {
573 if this.Member == nil || this.Member.MemberId == 0 {
574 this.JsonResult(1, "请先登录")
575 }
576 reward, err := models.NewSign().Sign(this.Member.MemberId, false)
577 if err != nil {
578 this.JsonResult(1, "签到失败:"+err.Error())
579 }
580 this.JsonResult(0, fmt.Sprintf("恭喜您,签到成功,奖励阅读时长 %v 秒", reward))
581}
582
583func (this *BaseController) forbidGeneralRole() bool {
584 // 如果只有作者和管理员才能写作的话,那么已创建了书籍的普通用户无法将书籍转为公开或者是私密分享

Callers

nothing calls this directly

Calls 3

JsonResultMethod · 0.95
NewSignFunction · 0.92
SignMethod · 0.80

Tested by

no test coverage detected