* 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>
10 lines
278 B
TypeScript
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;
|
|
};
|