mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-30 02:38:28 +01:00
dd30d9d5c0
The function `GetByBean` has an obvious defect that when the fields are empty values, it will be ignored. Then users will get a wrong result which is possibly used to make a security problem. To avoid the possibility, this PR removed function `GetByBean` and all references. And some new generic functions have been introduced to be used. The recommand usage like below. ```go // if query an object according id obj, err := db.GetByID[Object](ctx, id) // query with other conditions obj, err := db.Get[Object](ctx, builder.Eq{"a": a, "b":b}) ``` |
||
---|---|---|
.. | ||
main_test.go | ||
mini_org.go | ||
org.go | ||
org_repo.go | ||
org_test.go | ||
org_user.go | ||
org_user_test.go | ||
team.go | ||
team_invite.go | ||
team_invite_test.go | ||
team_list.go | ||
team_repo.go | ||
team_test.go | ||
team_unit.go | ||
team_user.go |