Skip to content

Commit f9c9dd0

Browse files
committed
Fix test
1 parent 712693b commit f9c9dd0

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

models/org.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,11 @@ type FindOrgOptions struct {
526526
IncludePrivate bool
527527
}
528528

529+
func queryUserOrgIDs(userID int64) *builder.Builder {
530+
return builder.Select("org_id").From("org_user").
531+
Where(builder.Eq{"uid": userID})
532+
}
533+
529534
func (opts FindOrgOptions) toConds() builder.Cond {
530535
var cond = builder.NewCond()
531536
if opts.UserID > 0 {

routers/api/v1/org/org.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func listUserOrgs(ctx *context.APIContext, u *models.User) {
4747
apiOrgs[i] = convert.ToOrganization(orgs[i])
4848
}
4949

50-
ctx.SetLinkHeader(maxResults, listOptions.PageSize)
50+
ctx.SetLinkHeader(int(maxResults), listOptions.PageSize)
5151
ctx.SetTotalCountHeader(int64(maxResults))
5252
ctx.JSON(http.StatusOK, &apiOrgs)
5353
}

routers/web/user/setting/profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func Organization(ctx *context.Context) {
216216
ctx.Data["PageIsSettingsOrganization"] = true
217217

218218
opts := models.FindOrgOptions{
219-
ListOptions: models.ListOptions{
219+
ListOptions: db.ListOptions{
220220
PageSize: setting.UI.Admin.UserPagingNum,
221221
Page: ctx.FormInt("page"),
222222
},

0 commit comments

Comments
 (0)