fix(admin): activity logs empty success filter showing no results
- Fixed issue where empty string success filter was interpreted as false - Backend was filtering for only failed logs when success='' was sent - Added check to skip sending success parameter when empty string - Activity logs page now shows all logs when filters are set to 'All' Bug: When user selected 'All' for success filter, frontend sent success='', backend parsed this as success=false, showing only failed logs (usually none).
This commit is contained in:
@@ -475,7 +475,8 @@ export const adminAPI = {
|
||||
if (category) params.append('category', category);
|
||||
if (username) params.append('username', username);
|
||||
if (userId) params.append('userId', String(userId));
|
||||
if (success !== undefined) params.append('success', String(success));
|
||||
// Only send success if it's not empty string (to avoid filtering to false when user wants all logs)
|
||||
if (success !== undefined && success !== '') params.append('success', String(success));
|
||||
params.append('limit', String(limit));
|
||||
params.append('offset', String(offset));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user