Linter fixes and proper error handling in PromoteToPm
This commit is contained in:
parent
7635791f09
commit
1f4abc2a6a
3 changed files with 6 additions and 2 deletions
|
@ -44,6 +44,10 @@ func PromoteToPm(c *fiber.Ctx) error {
|
|||
|
||||
// Add the user to the project with the specified role
|
||||
err = db.GetDb(c).ChangeUserRole(new_pm_name, project, "project_manager")
|
||||
if err != nil {
|
||||
log.Info("Error promoting user to project manager:", err)
|
||||
return c.Status(500).SendString(err.Error())
|
||||
}
|
||||
|
||||
// Return success message
|
||||
log.Info("User : ", new_pm_name, " promoted to project manager in project: ", project)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue