Initial commit: Mana Collection NestJS backend.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-09-07 20:49:55 +03:30
co-authored by Cursor
commit fe78a99b78
87 changed files with 10557 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import { Controller, Get, Param, Query } from '@nestjs/common';
import { PublicService } from './public.service';
@Controller('public')
export class PublicController {
constructor(private readonly publicService: PublicService) {}
@Get('stores')
listStores() {
return this.publicService.listStores();
}
@Get('products')
listProducts(
@Query('storeId') storeId?: string,
@Query('storeSlug') storeSlug?: string,
@Query('name') name?: string,
@Query('categoryId') categoryId?: string,
@Query('minPrice') minPrice?: number,
@Query('maxPrice') maxPrice?: number,
) {
return this.publicService.listProducts({
storeId,
storeSlug,
name,
categoryId,
minPrice,
maxPrice,
});
}
@Get('products/:id')
findProduct(@Param('id') id: string) {
return this.publicService.findProduct(id);
}
@Get('blogs')
listBlogs(@Query('storeSlug') storeSlug?: string) {
return this.publicService.listBlogs(storeSlug);
}
}