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>
This commit is contained in:
co-authored by
Cursor
parent
158523df7b
commit
953b87b616
@@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user