From 04264c13f25f11eeb31a6de6431b2e0ae896a838 Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 28 Mar 2024 23:40:33 +0800 Subject: [PATCH] fix: bypass presence data morph Signed-off-by: Innei --- apps/core/src/modules/activity/activity.controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/core/src/modules/activity/activity.controller.ts b/apps/core/src/modules/activity/activity.controller.ts index ef912ee2..14270f1d 100644 --- a/apps/core/src/modules/activity/activity.controller.ts +++ b/apps/core/src/modules/activity/activity.controller.ts @@ -1,4 +1,5 @@ import { keyBy, pick } from 'lodash' +import snakecaseKeys from 'snakecase-keys' import { Body, Delete, Get, Param, Post, Query } from '@nestjs/common' @@ -68,12 +69,13 @@ export class ActivityController { @Get('/presence') @HTTPDecorators.SkipLogging + @HTTPDecorators.Bypass async getPresence(@Query() query: GetPresenceQueryDto) { return this.service .getRoomPresence(query.room_name) .then((list) => { return list.map(({ ip, ...item }) => { - return item + return snakecaseKeys(item) }) }) .then((list) => {