sanbo
commited on
Commit
·
651839a
1
Parent(s):
938213c
update sth. at 2024-12-17 23:22:24
Browse files- initialize/router.go +7 -3
initialize/router.go
CHANGED
@@ -2,6 +2,7 @@ package initialize
|
|
2 |
|
3 |
import (
|
4 |
"aurora/middlewares"
|
|
|
5 |
"os"
|
6 |
|
7 |
"github.com/gin-gonic/gin"
|
@@ -15,10 +16,13 @@ func RegisterRouter() *gin.Engine {
|
|
15 |
router := gin.Default()
|
16 |
router.Use(middlewares.Cors)
|
17 |
|
|
|
|
|
|
|
|
|
|
|
18 |
router.GET("/", func(c *gin.Context) {
|
19 |
-
c.
|
20 |
-
"message": "Hello, world!",
|
21 |
-
})
|
22 |
})
|
23 |
|
24 |
router.GET("/ping", func(c *gin.Context) {
|
|
|
2 |
|
3 |
import (
|
4 |
"aurora/middlewares"
|
5 |
+
"net/http"
|
6 |
"os"
|
7 |
|
8 |
"github.com/gin-gonic/gin"
|
|
|
16 |
router := gin.Default()
|
17 |
router.Use(middlewares.Cors)
|
18 |
|
19 |
+
// router.GET("/", func(c *gin.Context) {
|
20 |
+
// c.JSON(200, gin.H{
|
21 |
+
// "message": "Hello, world!",
|
22 |
+
// })
|
23 |
+
// })
|
24 |
router.GET("/", func(c *gin.Context) {
|
25 |
+
c.Redirect(http.StatusFound, "/web")
|
|
|
|
|
26 |
})
|
27 |
|
28 |
router.GET("/ping", func(c *gin.Context) {
|