31 lines
855 B
TypeScript
31 lines
855 B
TypeScript
import { Controller, Get, Param } from '@nestjs/common';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
import { AgenciesService } from '@gitroom/nestjs-libraries/database/prisma/agencies/agencies.service';
|
|
|
|
@ApiTags('Public')
|
|
@Controller('/public')
|
|
export class PublicController {
|
|
constructor(private _agenciesService: AgenciesService) {}
|
|
@Get('/agencies-list')
|
|
async getAgencyByUser() {
|
|
return this._agenciesService.getAllAgencies();
|
|
}
|
|
|
|
@Get('/agencies-list-slug')
|
|
async getAgencySlug() {
|
|
return this._agenciesService.getAllAgenciesSlug();
|
|
}
|
|
|
|
@Get('/agencies-information/:agency')
|
|
async getAgencyInformation(
|
|
@Param('agency') agency: string,
|
|
) {
|
|
return this._agenciesService.getAgencyInformation(agency);
|
|
}
|
|
|
|
@Get('/agencies-list-count')
|
|
async getAgenciesCount() {
|
|
return this._agenciesService.getCount();
|
|
}
|
|
}
|