mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 18:05:19 +02:00
Move Repo APIFormat to convert package (#13787)
* Move Repo APIFormat to convert package * tweek
This commit is contained in:
parent
2b4a08e962
commit
7ac8a770e1
18 changed files with 201 additions and 193 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/convert"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
"code.gitea.io/gitea/routers/api/v1/utils"
|
||||
)
|
||||
|
@ -27,7 +28,7 @@ func getWatchedRepos(user *models.User, private bool, listOptions models.ListOpt
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
repos[i] = watched.APIFormat(access)
|
||||
repos[i] = convert.ToRepo(watched, access)
|
||||
}
|
||||
return repos, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue