feat: complete remediation phase 3
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
Some checks failed
Automated Container Build / build-and-push (push) Failing after 15s
This commit is contained in:
parent
0221e277a6
commit
6772ba8c43
10 changed files with 63 additions and 20 deletions
|
|
@ -119,13 +119,11 @@ func (h *ShareHandler) ListShares(c *fiber.Ctx) error {
|
|||
|
||||
// Skip expired shares
|
||||
if expiresAt != nil {
|
||||
t, err := time.Parse("2006-01-02 15:04:05-07:00", *expiresAt)
|
||||
if err == nil && time.Now().After(t) {
|
||||
// To handle different time formats, we could parse it more robustly
|
||||
// but for now, we'll let frontend also check or we just check here.
|
||||
t, err := time.Parse(time.RFC3339, *expiresAt)
|
||||
if err != nil {
|
||||
t, err = time.Parse("2006-01-02 15:04:05", *expiresAt)
|
||||
}
|
||||
t2, err2 := time.Parse(time.RFC3339, *expiresAt)
|
||||
if err2 == nil && time.Now().After(t2) {
|
||||
if err == nil && time.Now().After(t) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue