feat: accept access to cache
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package oauth
|
package oauth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"gitea.local/admin/hspguard/internal/cache"
|
||||||
"gitea.local/admin/hspguard/internal/config"
|
"gitea.local/admin/hspguard/internal/config"
|
||||||
imiddleware "gitea.local/admin/hspguard/internal/middleware"
|
imiddleware "gitea.local/admin/hspguard/internal/middleware"
|
||||||
"gitea.local/admin/hspguard/internal/repository"
|
"gitea.local/admin/hspguard/internal/repository"
|
||||||
@ -8,13 +9,15 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type OAuthHandler struct {
|
type OAuthHandler struct {
|
||||||
repo *repository.Queries
|
repo *repository.Queries
|
||||||
cfg *config.AppConfig
|
cache *cache.Client
|
||||||
|
cfg *config.AppConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewOAuthHandler(repo *repository.Queries, cfg *config.AppConfig) *OAuthHandler {
|
func NewOAuthHandler(repo *repository.Queries, cache *cache.Client, cfg *config.AppConfig) *OAuthHandler {
|
||||||
return &OAuthHandler{
|
return &OAuthHandler{
|
||||||
repo,
|
repo,
|
||||||
|
cache,
|
||||||
cfg,
|
cfg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user