(shareId: string)
| 59 | } |
| 60 | |
| 61 | export function getShare(shareId: string): StoredShare | null { |
| 62 | const entry = store.get(shareId); |
| 63 | if (!entry) return null; |
| 64 | |
| 65 | // Check expiry |
| 66 | if (entry.expiresAt !== undefined && Date.now() > entry.expiresAt) { |
| 67 | store.delete(shareId); |
| 68 | return null; |
| 69 | } |
| 70 | |
| 71 | return entry; |
| 72 | } |
| 73 | |
| 74 | export function verifySharePassword(shareId: string, password: string): boolean { |
| 75 | const entry = store.get(shareId); |