Skip to content

fix(change_logs):add change logs entries for user update/create #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChayanDass
Copy link
Contributor

add changelogs for user updates and creation


AddChangelog("Username", oldUser.UserName, newUser.UserName, &changes)
AddChangelog("Displayname", oldUser.DisplayName, newUser.DisplayName, &changes)
AddChangelog("Useremail", oldUser.UserEmail, newUser.UserEmail, &changes)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make field name camel case

@@ -358,7 +358,7 @@ type Audit struct {
UserId int64 `json:"user_id" gorm:"column:user_id" example:"123"`
User User `gorm:"foreignKey:UserId;references:Id" json:"user"`
Timestamp time.Time `json:"timestamp" gorm:"column:timestamp" example:"2023-12-01T18:10:25.00+05:30"`
Type string `json:"type" gorm:"column:type" enums:"obligation,license" example:"license"`
Type string `json:"type" gorm:"column:type" enums:"obligation,license,user" example:"license"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make all enums uppercase

return nil
}

if err := utils.AddChangelogsForUser(tx, username, &user, &models.User{}); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Changelog for user created via oidc and delete user.

@ChayanDass ChayanDass requested a review from deo002 June 23, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants