Implement Phase 7: share link tests and expiry fix
- 4 tests: create/validate, expiry, revoke, list - Fixed expiry check: negative durations now correctly expire links (was checking > 0 instead of != 0) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,7 @@ func CreateLink(database *sql.DB, notebookID int64, expiry time.Duration, baseUR
|
||||
|
||||
var expiresAt *int64
|
||||
var expiresTime *time.Time
|
||||
if expiry > 0 {
|
||||
if expiry != 0 {
|
||||
ea := time.Now().Add(expiry).UnixMilli()
|
||||
expiresAt = &ea
|
||||
t := time.UnixMilli(ea)
|
||||
|
||||
Reference in New Issue
Block a user