mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 15:17:30 +00:00
feat: quality of life sweep from the feature discussions
Small requests from the discussions, each built end to end: planner and map (cycling mode, date first headings, clear a day, stay times per day, off-route stops, map lock, compact unplanned markers, pending stays, cable car, transit quick picks), places (location filter, category from OSM, open in maps, geo: link, image from an attachment, enrichment on file import, places near a pin, place name language, Amap first in China), lists and costs (packed counter, inherited sharing, Markdown to-dos, payment notes, bookings CSV, my plan PDF), sharing (unplanned places, travel only, without photos), journey (photo zoom, drafts, photo order, trip suggestion, day jump), atlas (region counter, region bucket list, places per country), vacay half company holidays, studio copy and paste plus the book's own layouts, and RESTORE_FROM_BACKUP for a first start restore.
This commit is contained in:
@@ -27,7 +27,7 @@ import { StorageService } from '../storage/storage.service';
|
||||
import { isClientAbortError } from '../storage/storage.types';
|
||||
import { JwtAuthGuard } from '../auth/jwt-auth.guard';
|
||||
import { CurrentUser } from '../auth/current-user.decorator';
|
||||
import { MapsSearchDto, MapsAutocompleteDto, MapsResolveUrlDto } from './maps.dto';
|
||||
import { MapsSearchDto, MapsNearbyDto, MapsAutocompleteDto, MapsResolveUrlDto } from './maps.dto';
|
||||
|
||||
/** Google's session-token shape: URL-safe ASCII, at most 36 characters. The
|
||||
* autocomplete body is validated by the Zod pipe; the details query is not,
|
||||
@@ -83,6 +83,21 @@ export class MapsController {
|
||||
}
|
||||
}
|
||||
|
||||
// Places of any kind around a point, nearest first (#976).
|
||||
@Post('nearby')
|
||||
@HttpCode(200)
|
||||
async nearby(
|
||||
@CurrentUser() user: User,
|
||||
@Body() body: MapsNearbyDto,
|
||||
@Query('lang') lang?: string,
|
||||
): Promise<MapsSearchResult> {
|
||||
try {
|
||||
return await this.maps.nearbyPlaces(user.id, body.lat, body.lng, { radius: body.radius, limit: body.limit, lang });
|
||||
} catch (err: unknown) {
|
||||
throw toHttpException(err, 'Nearby search error', 500);
|
||||
}
|
||||
}
|
||||
|
||||
// OSM-only POI explore: places of a category within the current map viewport.
|
||||
@Get('pois')
|
||||
async pois(
|
||||
|
||||
Reference in New Issue
Block a user