From 7f906cb0a3639b4307a15e206cbca0e71bf1f398 Mon Sep 17 00:00:00 2001 From: HotelSync Date: Thu, 26 Mar 2026 10:19:01 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20loyalty=20route=20=E2=80=94=20use=20requ?= =?UTF-8?q?est.user.sub=20instead=20of=20userId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/routes/loyalty.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/routes/loyalty.ts b/backend/src/routes/loyalty.ts index ba392e1..9fc54cb 100644 --- a/backend/src/routes/loyalty.ts +++ b/backend/src/routes/loyalty.ts @@ -207,7 +207,7 @@ const loyaltyRoutes: FastifyPluginAsync = async (fastify) => { await db.query( `INSERT INTO loyalty_transactions (hotel_id, guest_id, amount, reason, notes, staff_id) VALUES ($1, $2, $3, $4, $5, $6)`, - [hotelId, guestId, amount, reason, notes ?? null, request.user.userId ?? null], + [hotelId, guestId, amount, reason, notes ?? null, request.user.sub ?? null], ) return {