Files
bdgrp_go/routes/api/user/param_userid/present.go
2026-09-06 21:57:03 +08:00

41 lines
660 B
Go

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, present)
fmt.Println("Loaded:", path)
})
}
func present(c *fiber.Ctx) error {
data := map[string]any{
"pagination": map[string]any{
"start": 9223372036854775807,
"limit": c.Query("limit"),
"record": 0,
},
}
encoded, err := pbutil.Encode("UserPresentLimit", data)
if err != nil {
fmt.Println(err)
}
encrypted, err := utils.Encrypt(encoded)
if err != nil {
fmt.Println(err)
}
return c.Send(encrypted)
}