feat: custom stickers apis

This commit is contained in:
Krispire Admin
2026-08-30 03:02:49 +05:30
parent fecb9bc045
commit 4427849647
6 changed files with 156 additions and 4 deletions
+3 -1
View File
@@ -327,7 +327,7 @@ func (s *Server) initAuth(cfg *config.Config, logger *zap.Logger) {
if err := rewardRepo.Seed(context.Background()); err != nil {
logger.Warn("sadhna: could not seed reward catalog", zap.Error(err))
}
sadhnaSvc := service.NewSadhnaService(sadhnaRepo, postRepo, userRepo, rewardRepo, logger)
sadhnaSvc := service.NewSadhnaService(sadhnaRepo, postRepo, userRepo, rewardRepo, r2, logger)
s.sadhnaH = handler.NewSadhnaHandler(sadhnaSvc)
// Feedback + stats — share Postgres with the rest of /api/v1 and
@@ -1163,6 +1163,8 @@ func (s *Server) setupRouter() {
// Announcements composed and published from the admin panel.
r.Get("/reward-gifts/catalog", s.sadhnaH.GiftableRewards)
r.Post("/reward-gifts", s.sadhnaH.GiftToEveryone)
r.Post("/reward-gifts/catalog", s.sadhnaH.CreateCustomGift)
r.Post("/reward-gifts/image-presign", s.sadhnaH.PresignGiftImage)
r.Get("/broadcasts", s.broadcastH.List)
r.Post("/broadcasts", s.broadcastH.Create)