mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Move unit into models/unit/ (#17576)
* Move unit into models/unit/ * Rename unit.UnitType as unit.Type
This commit is contained in:
@@ -7,7 +7,7 @@ package repo
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/unit"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
mirror_service "code.gitea.io/gitea/services/mirror"
|
||||
@@ -39,7 +39,7 @@ func MirrorSync(ctx *context.APIContext) {
|
||||
|
||||
repo := ctx.Repo.Repository
|
||||
|
||||
if !ctx.Repo.CanWrite(models.UnitTypeCode) {
|
||||
if !ctx.Repo.CanWrite(unit.TypeCode) {
|
||||
ctx.Error(http.StatusForbidden, "MirrorSync", "Must have write access")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user