hospital-log/backend/api/src/modules/tindakandokter/tindakandokter.controller.ts

33 lines
770 B
TypeScript
Raw Normal View History

import {
Controller,
Get,
Header,
HttpCode,
Param,
Query,
} from '@nestjs/common';
import { TindakanDokterService } from './tindakandokter.service';
@Controller('/tindakan')
export class TindakanDokterController {
constructor(private tindakanDokterService: TindakanDokterService) {}
@Get('/')
async getAllTindakanDokter(
@Query('take') take: number,
@Query('tindakan') tindakan: string,
@Query('skip') skip: number,
@Query('page') page: number,
@Query('orderBy') orderBy: string,
@Query('order') order: 'asc' | 'desc',
) {
return await this.tindakanDokterService.getAllTindakanDokter({
take,
tindakan,
skip,
page,
orderBy: orderBy ? { [orderBy]: order || 'asc' } : undefined,
});
}
}