package param_userid import ( "bdgrp_go/pbutil" "bdgrp_go/routes" "bdgrp_go/utils" "fmt" "github.com/gofiber/fiber/v2" ) func init() { path := routes.PathOf() routes.Register(func(app *fiber.App) { app.Get(path, liveFever) fmt.Println("Loaded:", path) }) } func liveFever(c *fiber.Ctx) error { data := map[string]any { "userId": c.Params("userId"), "count": 67, "inActivity": true, "limit": 3, } encoded, err := pbutil.Encode("UserLiveFeverCount", data) if err != nil { fmt.Println(err) } encrypted, err := utils.Encrypt(encoded) if err != nil { fmt.Println(err) } return c.Send(encrypted) }