mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-20 04:36:09 +08:00
19 lines
382 B
Go
19 lines
382 B
Go
![]() |
package middlewares
|
||
|
|
||
|
import (
|
||
|
"github.com/OpenListTeam/OpenList/v4/internal/conf"
|
||
|
"github.com/OpenListTeam/OpenList/v4/server/common"
|
||
|
"github.com/gin-gonic/gin"
|
||
|
)
|
||
|
|
||
|
func SharingIdParse(c *gin.Context) {
|
||
|
sid := c.Param("sid")
|
||
|
common.GinWithValue(c, conf.SharingIDKey, sid)
|
||
|
c.Next()
|
||
|
}
|
||
|
|
||
|
func EmptyPathParse(c *gin.Context) {
|
||
|
common.GinWithValue(c, conf.PathKey, "/")
|
||
|
c.Next()
|
||
|
}
|