From 6d2dcd04e978fc90fb198535335d81e913aaa998 Mon Sep 17 00:00:00 2001 From: William Oldham Date: Fri, 24 Nov 2023 18:55:20 +0000 Subject: [PATCH] Apply suggestions from code review --- src/routes/sessions/session.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/sessions/session.ts b/src/routes/sessions/session.ts index 74520f3..59ca037 100644 --- a/src/routes/sessions/session.ts +++ b/src/routes/sessions/session.ts @@ -41,7 +41,7 @@ export const sessionRouter = makeRouter((app) => { sid: z.string(), }), body: z.object({ - name: z.string().min(1).optional(), + deviceName: z.string().min(1).optional(), }), }, }, @@ -53,7 +53,7 @@ export const sessionRouter = makeRouter((app) => { if (targetedSession.id !== params.sid) throw new StatusError('Cannot edit sessions other than your own', 401); - if (body.name) targetedSession.device = body.name; + if (body.deviceName) targetedSession.device = body.deviceName; await em.persistAndFlush(targetedSession);