mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
43ec0b77a0
* Add on this day * add query for x year * dev: add query * dev: front end * dev: styling * styling * more styling * add new page * navigating * navigate back and forth * styling * show gallery * fix test * fix test * show previous and next title * fix test * show up down scrolling button * more styling * styling * fix app bar * fix height of next/previous * autoplay * auto play * refactor * refactor * refactor * show date * Navigate * finish * pr feedback
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { AssetService, AuthUserDto, MapMarkerResponseDto } from '@app/domain';
|
|
import { MapMarkerDto } from '@app/domain/asset/dto/map-marker.dto';
|
|
import { Controller, Get, Query } from '@nestjs/common';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
import { GetAuthUser } from '../decorators/auth-user.decorator';
|
|
import { Authenticated } from '../decorators/authenticated.decorator';
|
|
import { UseValidation } from '../decorators/use-validation.decorator';
|
|
import { MemoryLaneResponseDto } from '@app/domain/asset/response-dto/memory-lane-response.dto';
|
|
|
|
@ApiTags('Asset')
|
|
@Controller('asset')
|
|
@Authenticated()
|
|
@UseValidation()
|
|
export class AssetController {
|
|
constructor(private service: AssetService) {}
|
|
|
|
@Get('/map-marker')
|
|
getMapMarkers(@GetAuthUser() authUser: AuthUserDto, @Query() options: MapMarkerDto): Promise<MapMarkerResponseDto[]> {
|
|
return this.service.getMapMarkers(authUser, options);
|
|
}
|
|
|
|
@Get('memory-lane')
|
|
getMemoryLane(
|
|
@GetAuthUser() authUser: AuthUserDto,
|
|
@Query('timezone') timezone: string,
|
|
): Promise<MemoryLaneResponseDto[]> {
|
|
return this.service.getMemoryLane(authUser, timezone);
|
|
}
|
|
}
|