code-editor-api

only take sessions from last month

5/30/2023 11:33:42 AM

Details

diff --git a/Application/Helpers/SessionFiles.cs b/Application/Helpers/SessionFiles.cs
index ec6cb1c..86b7196 100644
--- a/Application/Helpers/SessionFiles.cs
+++ b/Application/Helpers/SessionFiles.cs
@@ -46,7 +46,7 @@ namespace CodeEditorApi.Helpers
                 res.Add(GetSession(folder));
             }
 
-            return res.OrderByDescending(x => x.Timestamp).ToArray();
+            return res.Where(x => x.Timestamp > DateTime.UtcNow.AddMonths(-1)).OrderByDescending(x => x.Timestamp).ToArray();
         }
 
         public static SessionData[] Get(Guid sessionId)