fix(server): accept showAt and hideAt for creating memories (#26429)

* fix(server): accept showAt and hideAt for creating memories

* fix history
This commit is contained in:
Mees Frensel
2026-02-23 22:26:34 +01:00
committed by GitHub
parent 9ea0a69a72
commit bf47147fbb
7 changed files with 106 additions and 3 deletions

View File

@@ -51,6 +51,20 @@ describe(MemoryController.name, () => {
errorDto.badRequest(['data.year must be a positive number', 'data.year must be an integer number']),
);
});
it('should accept showAt and hideAt', async () => {
const { status } = await request(ctx.getHttpServer())
.post('/memories')
.send({
type: 'on_this_day',
data: { year: 2020 },
memoryAt: new Date(2021).toISOString(),
showAt: new Date(2022).toISOString(),
hideAt: new Date(2023).toISOString(),
});
expect(status).toBe(201);
});
});
describe('GET /memories/statistics', () => {