diff options
| author | Bobby <[email protected]> | 2026-03-13 18:25:44 +0530 |
|---|---|---|
| committer | Bobby <[email protected]> | 2026-03-13 18:25:44 +0530 |
| commit | 344d02a7feddefb5c08f88dbe5f3a3f7e7da385f (patch) | |
| tree | 94deed23d82d7f868721cc00b5550f5c27e8b8f7 /shrine/repositories/user.go | |
| parent | 9f808807a557fc10a38a44cb52be6bfcdfda68b2 (diff) | |
| download | pagoda-main.tar.xz pagoda-main.zip | |
- 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/repositories/user.go')
| -rw-r--r-- | shrine/repositories/user.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shrine/repositories/user.go b/shrine/repositories/user.go index 73973da..39b75b5 100644 --- a/shrine/repositories/user.go +++ b/shrine/repositories/user.go @@ -49,13 +49,13 @@ func UpdateLastSeen(user *models.User) { func CountCitizens() int64 { var count int64 - database.DB.Model(&models.User{}).Where("email_verified = ?", true).Count(&count) + database.DB.Model(&models.User{}).Where("email_verified = ? AND account_banned = ? AND account_disabled = ?", true, false, false).Count(&count) return count } func CountOnline() int64 { var count int64 - database.DB.Model(&models.User{}).Where("last_seen_at > ?", time.Now().Add(-5*time.Minute)).Count(&count) + database.DB.Model(&models.User{}).Where("last_seen_at > ? AND account_banned = ? AND account_disabled = ?", time.Now().Add(-5*time.Minute), false, false).Count(&count) return count } |
