Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2023-04-26 01:41:11 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-04-26 01:41:11 +0300
commit46eb174af1baa2b8e1ce77120b76da84bb38d27d (patch)
tree9fe66761728ffb1a81a16cd764a0601fb2e281cc /web/controller
parentf8878208cad9084431863667130774ed1d45488f (diff)
remove unused
Diffstat (limited to 'web/controller')
-rw-r--r--web/controller/util.go15
1 files changed, 2 insertions, 13 deletions
diff --git a/web/controller/util.go b/web/controller/util.go
index 70549513..dc5c83b0 100644
--- a/web/controller/util.go
+++ b/web/controller/util.go
@@ -11,15 +11,6 @@ import (
"github.com/gin-gonic/gin"
)
-func getUriId(c *gin.Context) int64 {
- s := struct {
- Id int64 `uri:"id"`
- }{}
-
- _ = c.BindUri(&s)
- return s.Id
-}
-
func getRemoteIp(c *gin.Context) string {
value := c.GetHeader("X-Forwarded-For")
if value != "" {
@@ -86,10 +77,8 @@ func getContext(h gin.H) gin.H {
a := gin.H{
"cur_ver": config.GetVersion(),
}
- if h != nil {
- for key, value := range h {
- a[key] = value
- }
+ for key, value := range h {
+ a[key] = value
}
return a
}