feat(api): add client app service endpoints

This commit is contained in:
david
2026-07-30 18:04:34 +08:00
parent 47d352b22e
commit 550efb3812
29 changed files with 2147 additions and 44 deletions

View File

@@ -0,0 +1,34 @@
package routers
import (
"testing"
"github.com/gin-gonic/gin"
)
func TestRegisterClientRoutes(t *testing.T) {
gin.SetMode(gin.TestMode)
engine := gin.New()
RegisterClient("heqi", engine)
expected := map[string]bool{
"POST /heqi/client/v1/user/auth/register": false,
"POST /heqi/client/v1/user/auth/login": false,
"POST /heqi/client/v1/user/wallet/recharges": false,
"POST /heqi/client/v1/user/shop/orders/:identity/pay": false,
"POST /heqi/client/v1/staff/auth/login": false,
"POST /heqi/client/v1/staff/attendance": false,
"POST /heqi/client/v1/staff/tickets/:identity/submit-result": false,
}
for _, route := range engine.Routes() {
key := route.Method + " " + route.Path
if _, ok := expected[key]; ok {
expected[key] = true
}
}
for route, found := range expected {
if !found {
t.Errorf("missing route %s", route)
}
}
}