From 08ddb3fd498e49973fffb1a60aad81c53fb40ac5 Mon Sep 17 00:00:00 2001 From: zimujun20 <1192147078@qq.com> Date: Tue, 4 Oct 2022 13:57:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=8E=B7=E5=8F=96=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=9C=B0=E5=9D=80=E5=92=8C=E8=B4=9F=E8=BD=BD=E5=9D=87?= =?UTF-8?q?=E8=A1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/webserver/routers/router.go | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/webserver/routers/router.go b/src/webserver/routers/router.go index 0a88402..0c12a2c 100644 --- a/src/webserver/routers/router.go +++ b/src/webserver/routers/router.go @@ -3,8 +3,8 @@ package routers import ( "net/http" - android "webserver/api/android" - pc "webserver/api/pc" + android "webserver/pkg/api/android" + pc "webserver/pkg/api/pc" "github.com/gin-gonic/gin" ) @@ -13,12 +13,20 @@ import ( func InitRouter() *gin.Engine { r := gin.Default() - api := r.Group("/api") + api := r.Group("/pkg/api") { - api.GET("/android/hello", android.Hello) - api.POST("/android/hello", android.Hello) - api.GET("/pc/hello", pc.Hello) - api.POST("/pc/hello", pc.Hello) + api.GET("/android/hands_3d", android.hands_3d) + api.GET("/android/hands_recegnation", android.hands_recegnation) + api.GET("/android/hands_translation", android.hands_translation) + api.GET("/android/media_camera", android.media_camera) + api.GET("/android/media_pipe", android.media_pipe) + api.GET("/android/word_input", android.word_input) + api.GET("/android/word_recv", android.word_recv) + api.GET("/android/word_send", android.word_send) + api.GET("/android/word_show", android.word_show) + api.GET("/pc/load_alancing", pc.load_alancing) + api.GET("/pc/nginx-rtmp", pc.nginx-rtmp) + api.GET("/pc/webserver", pc.webserver) } // 静态文件路由 r.StaticFS("/web", http.Dir("./dist/"))