File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -4,20 +4,14 @@ export class LogsHttp {
44 constructor ( private logsRepository : LogsRepository ) { }
55
66 async getLogsPageVariables ( request : any , response : any ) : Promise < any > {
7- let excludeLevels : string [ ] = request . query . exclude_levels || [ ] ;
7+ // Check for query params (support both exclude_levels and exclude_levels[])
8+ let excludeLevels : string [ ] = request . query . exclude_levels || request . query [ 'exclude_levels[]' ] || [ 'debug' ] ;
9+
810 // Ensure it's always an array (Express sends single value as string)
911 if ( typeof excludeLevels === 'string' ) {
1012 excludeLevels = [ excludeLevels ] ;
1113 }
1214
13- if ( excludeLevels . length === 0 && ! ( 'filters' in request . cookies ) ) {
14- excludeLevels = [ 'debug' ] ;
15- }
16-
17- response . cookie ( 'filters' , excludeLevels , {
18- maxAge : 60 * 60 * 24 * 30 * 1000
19- } ) ;
20-
2115 return {
2216 logs : await this . logsRepository . getLatestLogs ( excludeLevels ) ,
2317 levels : await this . logsRepository . getLevels ( ) ,
You can’t perform that action at this time.
0 commit comments