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.
🔄 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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/fosrl/pangolin/pull/2114
Author: @depado
Created: 12/18/2025
Status: ❌ Closed
Base:
dev← Head:fix-analytics-filtering📝 Commits (1)
a013b5afix(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 returnundefinedinstead 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.