mirror of
https://github.com/immich-app/immich.git
synced 2025-11-26 08:15:17 -05:00
fix(server): broken memories (#23896)
This commit is contained in:
parent
074fdb2b96
commit
f11bfb9581
@ -24,6 +24,11 @@ describe(MemoryController.name, () => {
|
||||
await request(ctx.getHttpServer()).get('/memories');
|
||||
expect(ctx.authenticate).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not require any parameters', async () => {
|
||||
await request(ctx.getHttpServer()).get('/memories').query({});
|
||||
expect(service.search).toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
|
||||
describe('POST /memories', () => {
|
||||
|
||||
@ -5,7 +5,7 @@ import { Memory } from 'src/database';
|
||||
import { AssetResponseDto, mapAsset } from 'src/dtos/asset-response.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { AssetOrderWithRandom, MemoryType } from 'src/enum';
|
||||
import { ValidateBoolean, ValidateDate, ValidateEnum, ValidateUUID } from 'src/validation';
|
||||
import { Optional, ValidateBoolean, ValidateDate, ValidateEnum, ValidateUUID } from 'src/validation';
|
||||
|
||||
class MemoryBaseDto {
|
||||
@ValidateBoolean({ optional: true })
|
||||
@ -31,6 +31,7 @@ export class MemorySearchDto {
|
||||
@IsInt()
|
||||
@IsPositive()
|
||||
@Type(() => Number)
|
||||
@Optional()
|
||||
@ApiProperty({ type: 'integer', description: 'Number of memories to return' })
|
||||
size?: number;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user