summaryrefslogtreecommitdiffstats
path: root/routers/web/user/task.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/user/task.go')
-rw-r--r--routers/web/user/task.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/user/task.go b/routers/web/user/task.go
index fd561cdd4c..7f5ef792ad 100644
--- a/routers/web/user/task.go
+++ b/routers/web/user/task.go
@@ -8,16 +8,16 @@ import (
"net/http"
"strconv"
- "code.gitea.io/gitea/models"
+ admin_model "code.gitea.io/gitea/models/admin"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/json"
)
// TaskStatus returns task's status
func TaskStatus(ctx *context.Context) {
- task, opts, err := models.GetMigratingTaskByID(ctx.ParamsInt64("task"), ctx.Doer.ID)
+ task, opts, err := admin_model.GetMigratingTaskByID(ctx.ParamsInt64("task"), ctx.Doer.ID)
if err != nil {
- if models.IsErrTaskDoesNotExist(err) {
+ if admin_model.IsErrTaskDoesNotExist(err) {
ctx.JSON(http.StatusNotFound, map[string]interface{}{
"error": "task `" + strconv.FormatInt(ctx.ParamsInt64("task"), 10) + "` does not exist",
})
@@ -33,9 +33,9 @@ func TaskStatus(ctx *context.Context) {
if task.Message != "" && task.Message[0] == '{' {
// assume message is actually a translatable string
- var translatableMessage models.TranslatableMessage
+ var translatableMessage admin_model.TranslatableMessage
if err := json.Unmarshal([]byte(message), &translatableMessage); err != nil {
- translatableMessage = models.TranslatableMessage{
+ translatableMessage = admin_model.TranslatableMessage{
Format: "migrate.migrating_failed.error",
Args: []interface{}{task.Message},
}