From 5ee573740b67af1dfb1624705edcccee4f1fe8a2 Mon Sep 17 00:00:00 2001 From: Adrian Kunz Date: Wed, 9 Oct 2024 14:24:56 +0200 Subject: [PATCH] fix(assignments-service): Incorrect token generator --- services/apps/assignments/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/apps/assignments/src/utils.ts b/services/apps/assignments/src/utils.ts index 546dc223..4431c245 100644 --- a/services/apps/assignments/src/utils.ts +++ b/services/apps/assignments/src/utils.ts @@ -6,7 +6,7 @@ import {interval, map, mapTo, merge, Observable} from 'rxjs'; export function generateToken(): string { const bytes = randomBytes(8); const hex = bytes.toString('hex'); - return new Array(4).fill(0).map((_, index) => hex.substring(index * 4, 4)).join('-'); + return new Array(4).fill(0).map((_, index) => hex.substring(index * 4, index * 4 + 4)).join('-'); } export function eventStream(source: Observable>, name: string): Observable {