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
|
@ -38,7 +38,7 @@ func GetAllWeeklyReports(c *fiber.Ctx) error {
|
|||
return c.Status(500).SendString(err.Error())
|
||||
}
|
||||
|
||||
if pm == false && target_user != username {
|
||||
if pm && target_user != username {
|
||||
log.Info("Unauthorized access")
|
||||
return c.Status(403).SendString("Unauthorized access")
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ func GetWeeklyReport(c *fiber.Ctx) error {
|
|||
return c.Status(500).SendString(err.Error())
|
||||
}
|
||||
|
||||
if pm == false && target_user != username {
|
||||
if pm && target_user != username {
|
||||
log.Info("Unauthorized access")
|
||||
return c.Status(403).SendString("Unauthorized access")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue