mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Move wiki related funtions from models to services/wiki (#9355)
* Move wiki related funtions from models to services/wiki
This commit is contained in:
parent
e5d8e2d10c
commit
b9309e52f0
7 changed files with 558 additions and 529 deletions
|
@ -15,6 +15,7 @@ import (
|
|||
"code.gitea.io/gitea/modules/private"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
repo_service "code.gitea.io/gitea/services/repository"
|
||||
wiki_service "code.gitea.io/gitea/services/wiki"
|
||||
|
||||
"gitea.com/macaron/macaron"
|
||||
)
|
||||
|
@ -320,7 +321,7 @@ func ServCommand(ctx *macaron.Context) {
|
|||
|
||||
// Finally if we're trying to touch the wiki we should init it
|
||||
if results.IsWiki {
|
||||
if err = repo.InitWiki(); err != nil {
|
||||
if err = wiki_service.InitWiki(repo); err != nil {
|
||||
log.Error("Failed to initialize the wiki in %-v Error: %v", repo, err)
|
||||
ctx.JSON(http.StatusInternalServerError, map[string]interface{}{
|
||||
"results": results,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue