Files
backend/src/user-products/user-products.public.controller.ts
T
Alireza HassaniandCursor 953b87b616 Add public user-products storefront API and website docs.
Expose published customer listings under /tenants/:host/user-products (list, search, details, technical-info) and document them in the website API pack.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 00:19:13 +03:30

27 lines
833 B
TypeScript

import { Controller, Get, Param, Query } from '@nestjs/common';
import { ListPublicUserProductsDto } from './dto/user-product.dto';
import { UserProductsService } from './user-products.service';
@Controller('tenants/:host/user-products')
export class PublicUserProductsController {
constructor(private readonly service: UserProductsService) {}
@Get()
list(
@Param('host') host: string,
@Query() query: ListPublicUserProductsDto,
) {
return this.service.listPublic(host, query);
}
@Get(':slug/technical-info')
getTechnicalInfo(@Param('host') host: string, @Param('slug') slug: string) {
return this.service.getPublicTechnicalInfoBySlug(host, slug);
}
@Get(':slug')
getBySlug(@Param('host') host: string, @Param('slug') slug: string) {
return this.service.getPublicBySlug(host, slug);
}
}