mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-20 02:37:59 +08:00
chore!(all): attempt to update beego to v2
BREAKING CHANGE: beego has update to v2, and this version of mindoc IS NOT TESTED AND STABLE!!!
This commit is contained in:
@@ -3,9 +3,8 @@ package controllers
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/astaxie/beego"
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/astaxie/beego/orm"
|
||||
"github.com/beego/beego/v2/adapter/logs"
|
||||
"github.com/beego/beego/v2/adapter/orm"
|
||||
"github.com/mindoc-org/mindoc/conf"
|
||||
"github.com/mindoc-org/mindoc/models"
|
||||
)
|
||||
@@ -17,9 +16,9 @@ type BookMemberController struct {
|
||||
// AddMember 参加参与用户.
|
||||
func (c *BookMemberController) AddMember() {
|
||||
identify := c.GetString("identify")
|
||||
account,_ := c.GetInt("account")
|
||||
account, _ := c.GetInt("account")
|
||||
roleId, _ := c.GetInt("role_id", 3)
|
||||
beego.Info(account)
|
||||
logs.Info(account)
|
||||
if identify == "" || account <= 0 {
|
||||
c.JsonResult(6001, "参数错误")
|
||||
}
|
||||
@@ -29,7 +28,6 @@ func (c *BookMemberController) AddMember() {
|
||||
c.JsonResult(6001, err.Error())
|
||||
}
|
||||
|
||||
|
||||
member := models.NewMember()
|
||||
|
||||
if _, err := member.Find(account); err != nil {
|
||||
|
Reference in New Issue
Block a user