0
0
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:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-08-10 21:43:13 -04:00
parent 11b5e75b92
commit f3199df895
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -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)