mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Refactor the original db code.
This commit is contained in:
@ -20,7 +20,6 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/casbin/casdoor/object"
|
||||
"github.com/casbin/casdoor/original"
|
||||
"github.com/casbin/casdoor/util"
|
||||
)
|
||||
|
||||
@ -168,7 +167,7 @@ func (c *ApiController) Signup() {
|
||||
return
|
||||
}
|
||||
|
||||
original.AddUserToOriginalDatabase(user)
|
||||
object.AddUserToOriginalDatabase(user)
|
||||
|
||||
if application.HasPromptPage() {
|
||||
// The prompt page needs the user to be signed in
|
||||
|
@ -21,7 +21,6 @@ import (
|
||||
|
||||
"github.com/astaxie/beego/utils/pagination"
|
||||
"github.com/casbin/casdoor/object"
|
||||
"github.com/casbin/casdoor/original"
|
||||
"github.com/casbin/casdoor/util"
|
||||
)
|
||||
|
||||
@ -120,7 +119,7 @@ func (c *ApiController) UpdateUser() {
|
||||
|
||||
affected := object.UpdateUser(id, &user, columns)
|
||||
if affected {
|
||||
original.UpdateUserToOriginalDatabase(&user)
|
||||
object.UpdateUserToOriginalDatabase(&user)
|
||||
}
|
||||
|
||||
c.Data["json"] = wrapActionResponse(affected)
|
||||
|
Reference in New Issue
Block a user