mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-03 00:44:35 -04:00
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
8698458f48
commit
0a7d3ff786
145 changed files with 360 additions and 369 deletions
|
@ -37,7 +37,7 @@ func TestUserIsPublicMember(t *testing.T) {
|
|||
}
|
||||
|
||||
func testUserIsPublicMember(t *testing.T, uid, orgID int64, expected bool) {
|
||||
user, err := user_model.GetUserByID(uid)
|
||||
user, err := user_model.GetUserByID(db.DefaultContext, uid)
|
||||
assert.NoError(t, err)
|
||||
is, err := organization.IsPublicMembership(orgID, user.ID)
|
||||
assert.NoError(t, err)
|
||||
|
@ -65,7 +65,7 @@ func TestIsUserOrgOwner(t *testing.T) {
|
|||
}
|
||||
|
||||
func testIsUserOrgOwner(t *testing.T, uid, orgID int64, expected bool) {
|
||||
user, err := user_model.GetUserByID(uid)
|
||||
user, err := user_model.GetUserByID(db.DefaultContext, uid)
|
||||
assert.NoError(t, err)
|
||||
is, err := organization.IsOrganizationOwner(db.DefaultContext, orgID, user.ID)
|
||||
assert.NoError(t, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue