Skip to content

Commit

Permalink
undo unrelated
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Oct 16, 2023
1 parent ccff382 commit 4cef37f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion routers/web/org/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func SettingsPost(ctx *context.Context) {

// Check if organization name has been changed.
if nameChanged {
err := user_service.RenameUser(ctx, org.AsUser(), form.Name)
err := org_service.RenameOrganization(ctx, org, form.Name)
switch {
case user_model.IsErrUserAlreadyExist(err):
ctx.Data["OrgName"] = true
Expand Down
5 changes: 5 additions & 0 deletions services/org/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ func DeleteOrganization(ctx context.Context, org *org_model.Organization, purge

return nil
}

// RenameOrganization renames an organization.
func RenameOrganization(ctx context.Context, org *org_model.Organization, newName string) error {
return user_service.RenameUser(ctx, org.AsUser(), newName)
}

0 comments on commit 4cef37f

Please sign in to comment.