28 lines
455 B
Go
28 lines
455 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/iapologizewhenimwrong/Vestmore_GO/server/app/internal/handlers"
|
|
)
|
|
|
|
func AppV10(ctx *gin.Context) {
|
|
if actionKey, ok := ctx.GetPostForm("action"); ok {
|
|
handlers.HandlersFuncRoutes[actionKey](ctx)
|
|
}
|
|
}
|
|
|
|
func main() {
|
|
r := gin.Default()
|
|
v10 := r.Group("app")
|
|
|
|
v10.POST("/1_0", AppV10)
|
|
|
|
for k := range handlers.HandlersFuncRoutes {
|
|
log.Printf("api %s", k)
|
|
}
|
|
|
|
r.Run(":8080")
|
|
}
|