통계 콘텐츠 세션 원장 추가

This commit is contained in:
2026-07-29 14:48:14 +09:00
parent 1a5a1542b7
commit 4e7e12d8fe
15 changed files with 481 additions and 47 deletions

View File

@@ -40,3 +40,13 @@ export const createRealtimeSessionHash = ({ clientSessionId, visitorHash, secret
const payload = `${clientSessionId}|${visitorHash}|${secret}`
return createHash('sha256').update(payload).digest('hex')
}
/**
* 콘텐츠 단위 세션 해시를 생성한다.
* @param {{ contentSessionId: string, visitorHash: string, secret: string }} input - 해시 입력
* @returns {string} 콘텐츠 세션 해시
*/
export const createContentSessionHash = ({ contentSessionId, visitorHash, secret }) => {
const payload = `${contentSessionId}|${visitorHash}|${secret}`
return createHash('sha256').update(payload).digest('hex')
}