mirror of
https://github.com/go-gitea/gitea.git
synced 2026-04-04 12:26:12 +02:00
add UpdateGroup function
This commit is contained in:
parent
11b5e75b92
commit
f3199df895
@ -322,6 +322,12 @@ func ParentGroupCond(idStr string, groupID int64) builder.Cond {
|
||||
return builder.In(idStr, groupList)
|
||||
}
|
||||
|
||||
func UpdateGroup(ctx context.Context, group *Group) error {
|
||||
sess := db.GetEngine(ctx)
|
||||
_, err := sess.Table(group.TableName()).ID(group.ID).Update(group)
|
||||
return err
|
||||
}
|
||||
|
||||
func MoveGroup(ctx context.Context, group *Group, newParent int64, newSortOrder int) error {
|
||||
sess := db.GetEngine(ctx)
|
||||
ng, err := GetGroupByID(ctx, newParent)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user