mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 18:58:38 +00:00
Move more model into models/user (#17826)
* Move more model into models/user * Remove unnecessary comment Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -94,7 +94,7 @@ func EmailPost(ctx *context.Context) {
|
||||
|
||||
// Make emailaddress primary.
|
||||
if ctx.FormString("_method") == "PRIMARY" {
|
||||
if err := models.MakeEmailPrimary(&user_model.EmailAddress{ID: ctx.FormInt64("id")}); err != nil {
|
||||
if err := user_model.MakeEmailPrimary(&user_model.EmailAddress{ID: ctx.FormInt64("id")}); err != nil {
|
||||
ctx.ServerError("MakeEmailPrimary", err)
|
||||
return
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ func DeleteAccountLink(ctx *context.Context) {
|
||||
if id <= 0 {
|
||||
ctx.Flash.Error("Account link id is not given")
|
||||
} else {
|
||||
if _, err := models.RemoveAccountLink(ctx.User, id); err != nil {
|
||||
if _, err := user_model.RemoveAccountLink(ctx.User, id); err != nil {
|
||||
ctx.Flash.Error("RemoveAccountLink: " + err.Error())
|
||||
} else {
|
||||
ctx.Flash.Success(ctx.Tr("settings.remove_account_link_success"))
|
||||
@@ -76,7 +76,7 @@ func loadSecurityData(ctx *context.Context) {
|
||||
}
|
||||
ctx.Data["Tokens"] = tokens
|
||||
|
||||
accountLinks, err := models.ListAccountLinks(ctx.User)
|
||||
accountLinks, err := user_model.ListAccountLinks(ctx.User)
|
||||
if err != nil {
|
||||
ctx.ServerError("ListAccountLinks", err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user