You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: GET_audits.go
    path of file: ./repos/horahora/front_api/routes
    
    the code of the file until where you have to start completion: package routes

import (
	"context"
	"net/http"
	"strconv"

	userproto "github.com/horahoradev/horahora/user_service/protocol"
	"github.com/labstack/echo/v4"
)

// Route: POST /rate/:id where id is video id
// Accepts query parameter "rating" (fl
    
func (v RouteHandler) handleGetAudits(c echo.Context) error {
	userID := c.Param("id")
	userIDInt, err := strconv.ParseInt(userID, 10, 64)
	if err != nil {
		userIDInt = -1 // no user
	}

	profile, err := v.getUserProfileInfo(c)
	if err != nil {
		return err
	}

	// Only admins can see audit logs
	if profile.Rank != 2 {
		return c.String(http.StatusForbidden, "Insufficient user status")
	}

	pageNum := getPageNumber(c)

	resp, err := v.u.GetAuditEvents(context.TODO(), &userproto.AuditEventsListRequest{
		Page:   pageNum,
		UserId: userIDInt,
	})
	if err != nil {
		return err
	}

	var data AuditData
	data.Length = int(resp.NumEvents)

	for _, event := range resp.Events {
		data.Events = append(data.Events, AuditEvent{
			ID:        event.Id,
			UserID:    event.User_ID,
			Message:   event.Message,
			Timestamp: event.Timestamp,
		})
	}

	return c.JSON(http.StatusOK, data)
}