mirror of
https://gitlab.com/mobicoop/v3/service/configuration.git
synced 2026-01-11 06:42:39 +00:00
use configuration package as middleware
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export interface CarpoolConfig {
|
||||
departureTimeMargin: number;
|
||||
role: string;
|
||||
seatsProposed: number;
|
||||
seatsRequested: number;
|
||||
strictFrequency: boolean;
|
||||
}
|
||||
|
||||
export default registerAs('carpool', () => ({
|
||||
departureTimeMargin: process.env.DEPARTURE_TIME_MARGIN
|
||||
? parseInt(process.env.DEPARTURE_TIME_MARGIN, 10)
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export interface PaginationConfig {
|
||||
perPage: number;
|
||||
}
|
||||
|
||||
export default registerAs('pagination', () => ({
|
||||
perPage: process.env.PER_PAGE ? parseInt(process.env.PER_PAGE, 10) : 10,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user