Download src/app/api/bootstrap/route.ts from phucsd/PrintCal: direct link, hf CLI and curl.
- Browser
- Download file 599 Bytes
-
https://huggingface.co/spaces/phucsd/PrintCal/resolve/main/src/app/api/bootstrap/route.ts
- Command line
-
hf download hf://spaces/phucsd/PrintCal/src/app/api/bootstrap/route.ts
-
curl -L -o route.ts https://huggingface.co/spaces/phucsd/PrintCal/resolve/main/src/app/api/bootstrap/route.ts
599 Bytes
| import { ok, route } from '@/lib/api'; | |
| import { customers, finishingServices, giaCongPrices, kemGiayPrices, offsetMachines, orders, papers, settings } from '@/lib/repositories'; | |
| /** Toàn bộ dữ liệu danh mục cho màn hình tính giá – 1 request duy nhất */ | |
| export const GET = route(async () => | |
| ok({ | |
| papers: papers.list(), | |
| offsetMachines: offsetMachines.list(), | |
| giaCong: giaCongPrices.list(), | |
| kemGiay: kemGiayPrices.list(), | |
| finishing: finishingServices.list(), | |
| customers: customers.list(), | |
| settings: settings.get(), | |
| orderCount: orders.count(), | |
| }) | |
| ); | |