({
keyWithSearchPermissions,
filter_by,
}: {
keyWithSearchPermissions: string;
filter_by: string;
})
| 4 | const expiresAt = () => Math.floor(new Date().getTime() / 1000.0) + week; |
| 5 | |
| 6 | function createKey({ |
| 7 | keyWithSearchPermissions, |
| 8 | filter_by, |
| 9 | }: { |
| 10 | keyWithSearchPermissions: string; |
| 11 | filter_by: string; |
| 12 | }) { |
| 13 | const expires_at = expiresAt(); |
| 14 | const value = client |
| 15 | .keys() |
| 16 | .generateScopedSearchKey(keyWithSearchPermissions, { |
| 17 | filter_by, |
| 18 | expires_at, |
| 19 | }); |
| 20 | return { value, expires_at }; |
| 21 | } |
| 22 | |
| 23 | export function createFeedKey({ |
| 24 | keyWithSearchPermissions, |
no test coverage detected