From f0d3a61e7bce83bc792c95118660965663e945c5 Mon Sep 17 00:00:00 2001 From: LandaMm Date: Sat, 7 Jun 2025 19:16:57 +0200 Subject: [PATCH] feat: accept access to cache --- internal/oauth/routes.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/oauth/routes.go b/internal/oauth/routes.go index 43e5103..10a6876 100644 --- a/internal/oauth/routes.go +++ b/internal/oauth/routes.go @@ -1,6 +1,7 @@ package oauth import ( + "gitea.local/admin/hspguard/internal/cache" "gitea.local/admin/hspguard/internal/config" imiddleware "gitea.local/admin/hspguard/internal/middleware" "gitea.local/admin/hspguard/internal/repository" @@ -8,13 +9,15 @@ import ( ) type OAuthHandler struct { - repo *repository.Queries - cfg *config.AppConfig + repo *repository.Queries + 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{ repo, + cache, cfg, } }