feat: add Level field to role creation and update functionality
Deploy Application / deploy (push) Successful in 23s
Details
Deploy Application / deploy (push) Successful in 23s
Details
This commit is contained in:
parent
15dce0f540
commit
69eb45c1fc
|
|
@ -273,6 +273,7 @@ func (r *roleService) CreateRole(ctx context.Context, req dto.RoleCreateRequest)
|
||||||
Name: req.Name,
|
Name: req.Name,
|
||||||
Description: req.Description,
|
Description: req.Description,
|
||||||
IconUrl: req.IconUrl,
|
IconUrl: req.IconUrl,
|
||||||
|
Level: req.Level,
|
||||||
Type: req.Type,
|
Type: req.Type,
|
||||||
HomeUrl: req.HomeUrl,
|
HomeUrl: req.HomeUrl,
|
||||||
ClientID: clientUUID,
|
ClientID: clientUUID,
|
||||||
|
|
@ -493,6 +494,9 @@ func (r *roleService) UpdateRole(ctx context.Context, id string, req dto.RoleUpd
|
||||||
if req.HomeUrl != "" {
|
if req.HomeUrl != "" {
|
||||||
existingRole.HomeUrl = req.HomeUrl
|
existingRole.HomeUrl = req.HomeUrl
|
||||||
}
|
}
|
||||||
|
if req.Level != 0 {
|
||||||
|
existingRole.Level = req.Level
|
||||||
|
}
|
||||||
|
|
||||||
updatedRole, err := r.roleRepo.UpdateRole(ctx, r.db, existingRole)
|
updatedRole, err := r.roleRepo.UpdateRole(ctx, r.db, existingRole)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue