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 { | |
forwardRef, | |
MiddlewareConsumer, | |
Module, | |
NestModule, | |
} from '@nestjs/common'; | |
import { TypeOrmModule } from '@nestjs/typeorm'; | |
import { Audit } from '@/audit/entities/audit.entity'; | |
import { AuditMiddleware } from '@/audit/middlewares/audit.middleware'; | |
import { APP_GUARD } from '@nestjs/core'; |
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
<?php | |
namespace App\Support\Routing; | |
use Illuminate\Routing\UrlGenerator as BaseUrlGenerator; | |
use Mcamara\LaravelLocalization\Facades\LaravelLocalization; | |
class UrlGenerator extends BaseUrlGenerator | |
{ | |
public function to($path, $extra = [], $secure = null): string |
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 { Injectable } from '@nestjs/common'; | |
import { | |
ValidationArguments, | |
ValidatorConstraint, | |
ValidatorConstraintInterface, | |
} from 'class-validator'; | |
import { ComparisonValidatorType } from '@/app/enums/comparison-validator-type.enum'; | |
export type ComparisonValidatorConstraint<T extends object> = [ | |
keyof T, |
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 { | |
EntityManager, | |
EntityTarget, | |
ObjectLiteral, | |
SelectQueryBuilder, | |
} from 'typeorm'; | |
import { Injectable } from '@nestjs/common'; | |
import { | |
ValidationArguments, | |
ValidatorConstraint, |
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 { | |
Catch, | |
ExceptionFilter, | |
HttpException, | |
HttpStatus, | |
} from '@nestjs/common'; | |
import { QueryFailedError } from 'typeorm'; | |
import { camelCase } from 'typeorm/util/StringUtils'; | |
export enum PostgresErrorCode { |
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 { | |
Injectable, | |
ExecutionContext, | |
CallHandler, | |
ClassSerializerInterceptor, | |
PlainLiteralObject, | |
} from '@nestjs/common'; | |
import { Request } from 'express'; | |
import { Observable } from 'rxjs'; | |
import { map } from 'rxjs/operators'; |
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 { getJwtToken, removeJwtToken, setJwtToken } from '@/providers/auth-provider.ts'; | |
import { backendUrl } from '@/utils/config.ts'; | |
import type { JwtTokenModel } from '@/utils/models.ts'; | |
export interface FetcherResponse<TData> { | |
message: string; | |
statusCode: number; | |
data?: TData; | |
error?: string; | |
page?: number; |
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 nodemailer from 'nodemailer'; | |
import { FindOptionsWhere, IsNull, Like, Not, Repository } from 'typeorm'; | |
import { User } from '@/user/entities/user.entity'; | |
import { Notification } from '@/common/entities/notification.entity'; | |
import { InjectRepository } from '@nestjs/typeorm'; | |
import { | |
forwardRef, | |
Inject, | |
Injectable, | |
NotFoundException, |
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
// This must be in a top-level module as a provider (e.g. AppModule or a shared module marked as Global) | |
import { Inject, Injectable, Scope } from '@nestjs/common'; | |
import { REQUEST } from '@nestjs/core'; | |
import { Request } from 'express'; | |
import { DataSource, EntityTarget, ObjectLiteral } from 'typeorm'; | |
import { ActiveScopeRepository } from '@/common/repositories/active-scope.repository'; | |
@Injectable({ | |
scope: Scope.REQUEST, |
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 'dart:async'; | |
import 'dart:convert'; | |
import 'package:gql_exec/gql_exec.dart'; | |
import 'package:gql_link/gql_link.dart'; | |
import 'package:dart_pusher_channels/dart_pusher_channels.dart'; | |
typedef WsEventDecoder = | |
FutureOr<Map<String, dynamic>?> Function(String eventData); |
NewerOlder