mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-30 07:06:38 +08:00
15 lines
229 B
Go
15 lines
229 B
Go
package middleware
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
func PricesAuth() gin.HandlerFunc {
|
|
return func(c *gin.Context) {
|
|
typeParam := c.Query("type")
|
|
if typeParam == "old" {
|
|
AdminAuth()(c)
|
|
} else {
|
|
c.Next()
|
|
}
|
|
}
|
|
}
|