package middlewares

// |@@| C

import (
	"gardening/src/lib/uuider"
	"github.com/gin-gonic/gin"
)

type UidMiddleware struct {
	Uuider *uuider.Uuider
}

func (this *UidMiddleware) Act() gin.HandlerFunc {
	return func(c *gin.Context) {
		c.Set("uid", this.Uuider.GenerateUuid())
		c.Next()
	}
}
