Files
calendar/packages/lib/generateHashedLink.ts
T
a0451e34c1 fix: Ensure event type duplication respects private link setting (#13438)
* fix: Ensure event type duplication respects private link setting

* chode refactor

* Fix: Handler throwing error on creating duplicate of a collective event having private-link switched on.

---------

Co-authored-by: Keith Williams <keithwillcode@gmail.com>
2024-02-07 09:30:28 +01:00

10 lines
278 B
TypeScript

import short from "short-uuid";
import { v5 as uuidv5 } from "uuid";
export const generateHashedLink = (id: number) => {
const translator = short();
const seed = `${id}:${new Date().getTime()}`;
const uid = translator.fromUUID(uuidv5(seed, uuidv5.URL));
return uid;
};