[PR #2114] [CLOSED] fix(analytics): query latest 7 days #33031

Closed
opened 2026-06-15 10:32:18 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/2114
Author: @depado
Created: 12/18/2025
Status: Closed

Base: devHead: fix-analytics-filtering


📝 Commits (1)

  • a013b5a fix(analytics): query latest 7 days

📊 Changes

1 file changed (+0 additions, -2 deletions)

View changed files

📝 server/routers/auditLogs/queryRequestAnalytics.ts (+0 -2)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

Possible fix for default analytics endpoint not returning the correct data as shown in #2113

.optional() being placed before .prefault() in the Zod schema is causing it to short-circuit and return undefined instead of applying default values (or at least that's my understanding if it)

I'm not sure this fix actually solves the issue and I don't have enough data locally to test this. Feel free to discard my pull request if I went in the wrong direction or request changes if needed.
Also this issue might be present in other files but I focused on the analytics one, let me know if you want me to fix the other files in the same PR.

Also thanks for the great product!

fixes #2113


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/pangolin/pull/2114 **Author:** [@depado](https://github.com/depado) **Created:** 12/18/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix-analytics-filtering` --- ### 📝 Commits (1) - [`a013b5a`](https://github.com/fosrl/pangolin/commit/a013b5a1ec97ac6bb39cd543c6fee1c09e112618) fix(analytics): query latest 7 days ### 📊 Changes **1 file changed** (+0 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `server/routers/auditLogs/queryRequestAnalytics.ts` (+0 -2) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description Possible fix for default analytics endpoint not returning the correct data as shown in #2113 `.optional()` being placed before `.prefault()` in the Zod schema is causing it to short-circuit and return `undefined` instead of applying default values (or at least that's my understanding if it) I'm not sure this fix actually solves the issue and I don't have enough data locally to test this. Feel free to discard my pull request if I went in the wrong direction or request changes if needed. Also this issue might be present in other files but I focused on the analytics one, let me know if you want me to fix the other files in the same PR. Also thanks for the great product! fixes #2113 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-15 10:32:18 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#33031