This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function formatClassValidatorError( | |
| validationErrors: ValidationError[], | |
| accumulator: string[] = [], | |
| ): string[] { | |
| for (const error of validationErrors) { | |
| if (!error.children.length && !Object.keys(error.constraints).length) { | |
| return accumulator; | |
| } | |
| if (error.children.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM public.ecr.aws/docker/library/node:18-alpine AS base | |
| RUN apk upgrade \ | |
| && apk add dumb-init \ | |
| && rm -rf /var/cache/apk/* /tmp/* | |
| # ---------------------------------------------------------------------------- # | |
| FROM base AS development | |
| RUN apk upgrade \ | |
| && apk add dumb-init \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| Controller, | |
| Post, | |
| Body, | |
| ValidationPipe, | |
| applyDecorators, | |
| Patch, | |
| UsePipes, | |
| Param, | |
| ParseIntPipe, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {CACHE_MANAGER, Cache} from '@nestjs/cache-manager'; | |
| import {Injectable, NestInterceptor, ExecutionContext, CallHandler, Inject, Optional} from '@nestjs/common'; | |
| import {Request} from 'express'; | |
| import {Observable, of} from 'rxjs'; | |
| import {tap} from 'rxjs/operators'; | |
| import {CACHE_CONFIG, ONE_DAY_IN_MS} from '../constants'; | |
| import {ICacheConfigProvider} from '../interface/cache-config.interface'; | |
| @Injectable() | |
| export class RedisCacheInterceptor implements NestInterceptor { |