fix: remove unused variables in appeal handler
This commit is contained in:
parent
17d9df47e1
commit
277fc299b2
|
|
@ -117,12 +117,6 @@ func (h *AppealHandler) GetAppeal(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
appealID, err := uuid.Parse(c.Param("id"))
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid appeal ID"})
|
||||
return
|
||||
}
|
||||
|
||||
// Get violation first to check if user owns it
|
||||
violationID, err := uuid.Parse(c.Query("violation_id"))
|
||||
if err != nil {
|
||||
|
|
@ -164,7 +158,6 @@ func (h *AppealHandler) GetAppeal(c *gin.Context) {
|
|||
// Admin: GetPendingAppeals returns all pending appeals for admin review
|
||||
func (h *AppealHandler) GetPendingAppeals(c *gin.Context) {
|
||||
// Check if user is admin
|
||||
userIDStr, _ := c.Get("user_id")
|
||||
isAdmin, _ := c.Get("is_admin")
|
||||
if !isAdmin.(bool) {
|
||||
c.JSON(http.StatusForbidden, gin.H{"error": "Admin access required"})
|
||||
|
|
|
|||
Loading…
Reference in a new issue