File

apps/recallassess/recallassess-api/src/api/client/package/package.controller.ts

Prefix

api/client/package

Description

Client Package Controller Handles public package/pricing information for the landing page

Index

Methods

Methods

Async getActivePackages
getActivePackages(specialSlug?: string)
Decorators :
@Public()
@Get()

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 :
Name Type Optional
specialSlug string Yes

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);
  }
}

results matching ""

    No results matching ""