apps/recallassess/recallassess-api/src/api/client/package/package.controller.ts
api/client/package
Client Package Controller Handles public package/pricing information for the landing page
Methods |
|
| Async getActivePackages | ||||||
getActivePackages(specialSlug?: string)
|
||||||
Decorators :
@Public()
|
||||||
|
Get all active packages GET /api/client/package?sps=special-slug If not provided, only returns packages where special_slug is null or empty.
Parameters :
Returns :
Promise<CLPackageDto[]>
Array of active packages with pricing |
import { Public } from "@bish-nest/core/auth/decorator/public.decorator";
import { Controller, Get, Query } from "@nestjs/common";
import { CLPackageDto } from "./dto";
import { CLPackageService } from "./package.service";
/**
* Client Package Controller
* Handles public package/pricing information for the landing page
*/
@Controller("api/client/package")
export class CLPackageController {
constructor(private readonly packageService: CLPackageService) {}
/**
* Get all active packages
* GET /api/client/package?sps=special-slug
* @param sps Optional special slug filter. If provided, only returns packages with matching special_slug.
* If not provided, only returns packages where special_slug is null or empty.
* @returns Array of active packages with pricing
*/
@Public()
@Get()
async getActivePackages(@Query("sps") specialSlug?: string): Promise<CLPackageDto[]> {
return this.packageService.getActivePackages(specialSlug);
}
}