twitter & stream: formatting

This commit is contained in:
wukko
2023-12-17 23:50:04 +06:00
parent a7eb548c2b
commit e27c02c55e
2 changed files with 2 additions and 3 deletions

View File

@@ -18,9 +18,8 @@ streamCache.on("expired", (key) => {
const streamSalt = randomBytes(64).toString('hex');
export function createStream(obj) {
let lifespan = streamLifespan
let streamID = nanoid(),
exp = Math.floor(new Date().getTime()) + lifespan,
exp = Math.floor(new Date().getTime()) + streamLifespan,
ghmac = sha256(`${streamID},${obj.service},${exp}`, streamSalt);
if (!streamCache.has(streamID)) {