Skip to main content

Places index endpoint includes the name

Git Log

commit 55665480a6777a6ce6c98bfb280053e7cd81f64a
Author: Daniel Nelson <844258+daniel-nelson@users.noreply.github.com>
Date: Sat Nov 8 11:03:12 2025 -0600

Places index endpoint includes the name

```cosole
yarn psy sync
yarn uspec spec/unit/controllers/V1/Host/PlacesController.spec.ts

## Diff from d2c646b

```diff
diff --git a/api/spec/unit/controllers/V1/Host/PlacesController.spec.ts b/api/spec/unit/controllers/V1/Host/PlacesController.spec.ts
index 2fc1714..fe13004 100644
--- a/api/spec/unit/controllers/V1/Host/PlacesController.spec.ts
+++ b/api/spec/unit/controllers/V1/Host/PlacesController.spec.ts
@@ -32,6 +32,7 @@ describe('V1/Host/PlacesController', () => {
expect(body.results).toEqual([
expect.objectContaining({
id: place.id,
+ name: place.name,
}),
])
})
diff --git a/api/src/app/serializers/PlaceSerializer.ts b/api/src/app/serializers/PlaceSerializer.ts
index 83fab47..ba698d3 100644
--- a/api/src/app/serializers/PlaceSerializer.ts
+++ b/api/src/app/serializers/PlaceSerializer.ts
@@ -1,13 +1,15 @@
-import { DreamSerializer } from '@rvoh/dream'
import Place from '@models/Place.js'
+import { DreamSerializer } from '@rvoh/dream'

+// prettier-ignore
export const PlaceSummarySerializer = (place: Place) =>
DreamSerializer(Place, place)
.attribute('id')
+ .attribute('name')

+// prettier-ignore
export const PlaceSerializer = (place: Place) =>
PlaceSummarySerializer(place)
- .attribute('name')
.attribute('style')
.attribute('sleeps')
.attribute('deletedAt')