summaryrefslogtreecommitdiff
path: root/shrine/controllers
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-13 18:25:44 +0530
committerBobby <[email protected]>2026-03-13 18:25:44 +0530
commit344d02a7feddefb5c08f88dbe5f3a3f7e7da385f (patch)
tree94deed23d82d7f868721cc00b5550f5c27e8b8f7 /shrine/controllers
parent9f808807a557fc10a38a44cb52be6bfcdfda68b2 (diff)
downloadpagoda-main.tar.xz
pagoda-main.zip
feat: add letters feature with detail view and listingHEADmain
- Introduced new routes for letters and their details. - Created pages for displaying letter details and listing letters. - Added new types for letters, including participants, messages, and attachments. - Implemented API calls for fetching letters and managing messages (reply, edit, delete). - Enhanced stats to include unread letters and pending districts for staff users. - Updated styles for letters and their components. - Added privacy settings for letters (public and friends). - Modified user model to include letter privacy settings. - Improved error handling and user feedback in the UI.
Diffstat (limited to 'shrine/controllers')
-rw-r--r--shrine/controllers/stats.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/shrine/controllers/stats.go b/shrine/controllers/stats.go
index bf31c2e..cc2bf93 100644
--- a/shrine/controllers/stats.go
+++ b/shrine/controllers/stats.go
@@ -2,11 +2,14 @@ package controllers
import (
"shrine/services"
+ "shrine/utils/auth"
"shrine/utils/shortcuts"
"github.com/gofiber/fiber/v2"
)
func StatsController(context *fiber.Ctx) error {
- return shortcuts.Success(context, services.GetStats())
+ auth.IsAuthenticated(context)
+ citizen := auth.GetUser(context)
+ return shortcuts.Success(context, services.GetStats(citizen))
} \ No newline at end of file