Mhamdans17 commited on
Commit ·
27a7c82
1
Parent(s): 24fa56e
fix: hide QRIS pending topups from admin verification panel
Browse files
controllers/wallet_controller.go
CHANGED
|
@@ -141,10 +141,10 @@ func RequestTopupQris(c *gin.Context) {
|
|
| 141 |
|
| 142 |
// ==================== SUPER ADMIN ENDPOINTS ====================
|
| 143 |
|
| 144 |
-
// AdminGetPendingTopups melihat semua pengajuan topup yang menunggu
|
| 145 |
func AdminGetPendingTopups(c *gin.Context) {
|
| 146 |
var topups []models.TopupRequest
|
| 147 |
-
if err := config.DB.Preload("Company").Where("status = ?", "pending").Order("created_at asc").Find(&topups).Error; err != nil {
|
| 148 |
c.JSON(http.StatusInternalServerError, gin.H{"detail": "Gagal mengambil data top-up"})
|
| 149 |
return
|
| 150 |
}
|
|
|
|
| 141 |
|
| 142 |
// ==================== SUPER ADMIN ENDPOINTS ====================
|
| 143 |
|
| 144 |
+
// AdminGetPendingTopups melihat semua pengajuan topup yang menunggu (kecuali QRIS)
|
| 145 |
func AdminGetPendingTopups(c *gin.Context) {
|
| 146 |
var topups []models.TopupRequest
|
| 147 |
+
if err := config.DB.Preload("Company").Where("status = ? AND proof_url != ?", "pending", "QRIS TRIPAY").Order("created_at asc").Find(&topups).Error; err != nil {
|
| 148 |
c.JSON(http.StatusInternalServerError, gin.H{"detail": "Gagal mengambil data top-up"})
|
| 149 |
return
|
| 150 |
}
|