Add getInitScore().

This commit is contained in:
Yang Luo
2021-08-28 11:13:38 +08:00
parent eefcfd8440
commit b3eec024b8
6 changed files with 20 additions and 7 deletions

View File

@ -277,12 +277,6 @@ func (c *ApiController) Login() {
return
}
var score int
score, err = strconv.Atoi(beego.AppConfig.String("initScore"))
if err != nil {
panic(err)
}
properties := map[string]string{}
properties["no"] = strconv.Itoa(len(object.GetUsers(application.Organization)) + 2)
user := &object.User{
@ -295,7 +289,7 @@ func (c *ApiController) Login() {
Avatar: userInfo.AvatarUrl,
Address: []string{},
Email: userInfo.Email,
Score: score,
Score: getInitScore(),
IsAdmin: false,
IsGlobalAdmin: false,
IsForbidden: false,