aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-04-09 23:07:23 +0900
committerGitHub <noreply@github.com>2023-04-09 22:07:23 +0800
commit8bc8ca1953e9edfe1677378472c321b3d33875fd (patch)
treee25491506ff507762421fdd9a18bc4dc4ba19946 /routers/web
parentbedad23f9e043072bd6f260bff07919588e45e65 (diff)
downloadgitea-8bc8ca1953e9edfe1677378472c321b3d33875fd.tar.gz
gitea-8bc8ca1953e9edfe1677378472c321b3d33875fd.zip
Improve GetBoards and getDefaultBoard (#22981)
Change `GetBoards(ctx context.Context, projectID int64)` to `(p *Project) GetBoards(ctx context.Context) (BoardList, error)` `getDefaultBoard` is same.
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/org/projects.go2
-rw-r--r--routers/web/repo/projects.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/org/projects.go b/routers/web/org/projects.go
index 5d8005781d..5d1d7a15ca 100644
--- a/routers/web/org/projects.go
+++ b/routers/web/org/projects.go
@@ -313,7 +313,7 @@ func ViewProject(ctx *context.Context) {
return
}
- boards, err := project_model.GetBoards(ctx, project.ID)
+ boards, err := project.GetBoards(ctx)
if err != nil {
ctx.ServerError("GetProjectBoards", err)
return
diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go
index 91e17dee29..cef6893fbd 100644
--- a/routers/web/repo/projects.go
+++ b/routers/web/repo/projects.go
@@ -300,7 +300,7 @@ func ViewProject(ctx *context.Context) {
return
}
- boards, err := project_model.GetBoards(ctx, project.ID)
+ boards, err := project.GetBoards(ctx)
if err != nil {
ctx.ServerError("GetProjectBoards", err)
return