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
|
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
|
// Get violation first to check if user owns it
|
||||||
violationID, err := uuid.Parse(c.Query("violation_id"))
|
violationID, err := uuid.Parse(c.Query("violation_id"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -164,7 +158,6 @@ func (h *AppealHandler) GetAppeal(c *gin.Context) {
|
||||||
// Admin: GetPendingAppeals returns all pending appeals for admin review
|
// Admin: GetPendingAppeals returns all pending appeals for admin review
|
||||||
func (h *AppealHandler) GetPendingAppeals(c *gin.Context) {
|
func (h *AppealHandler) GetPendingAppeals(c *gin.Context) {
|
||||||
// Check if user is admin
|
// Check if user is admin
|
||||||
userIDStr, _ := c.Get("user_id")
|
|
||||||
isAdmin, _ := c.Get("is_admin")
|
isAdmin, _ := c.Get("is_admin")
|
||||||
if !isAdmin.(bool) {
|
if !isAdmin.(bool) {
|
||||||
c.JSON(http.StatusForbidden, gin.H{"error": "Admin access required"})
|
c.JSON(http.StatusForbidden, gin.H{"error": "Admin access required"})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue