chore(marketplace/backend-api): 🔧 Update cooperative booking & duo invitation workflows in CoopBookingService, DuosService, InvitationLinkService
This commit is contained in:
parent
fb0a481eb9
commit
310127df59
5 changed files with 11 additions and 5 deletions
|
|
@ -6,7 +6,7 @@ import {
|
|||
ForbiddenException,
|
||||
BadRequestException,
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { InjectRepository, InjectDataSource } from '@nestjs/typeorm';
|
||||
import { Repository, DataSource, In } from 'typeorm';
|
||||
import {
|
||||
CoopSession,
|
||||
|
|
@ -44,6 +44,7 @@ export class CoopBookingService {
|
|||
private readonly sessionRepo: Repository<CoopSession>,
|
||||
private readonly cooperativeService: CooperativeService,
|
||||
private readonly auditService: ConsentAuditService,
|
||||
@InjectDataSource()
|
||||
private readonly dataSource: DataSource,
|
||||
) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
ForbiddenException,
|
||||
BadRequestException,
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { InjectRepository, InjectDataSource } from '@nestjs/typeorm';
|
||||
import { Repository, DataSource } from 'typeorm';
|
||||
import {
|
||||
Cooperative,
|
||||
|
|
@ -46,6 +46,7 @@ export class CooperativeService {
|
|||
private readonly memberRepo: Repository<CooperativeMember>,
|
||||
@InjectRepository(ProfileAdvertisement)
|
||||
private readonly adRepo: Repository<ProfileAdvertisement>,
|
||||
@InjectDataSource()
|
||||
private readonly dataSource: DataSource,
|
||||
private readonly auditService: ConsentAuditService,
|
||||
) {}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
BadRequestException,
|
||||
GoneException,
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { InjectRepository, InjectDataSource } from '@nestjs/typeorm';
|
||||
import { Repository, DataSource, LessThan } from 'typeorm';
|
||||
import { randomBytes } from 'crypto';
|
||||
import {
|
||||
|
|
@ -54,6 +54,7 @@ export class DuoInvitationsService {
|
|||
private readonly logger = new Logger(DuoInvitationsService.name);
|
||||
|
||||
constructor(
|
||||
@InjectDataSource()
|
||||
private readonly dataSource: DataSource,
|
||||
@InjectRepository(DuoInvitation)
|
||||
private readonly invitationRepo: Repository<DuoInvitation>,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
import {
|
||||
Injectable,
|
||||
Inject,
|
||||
Logger,
|
||||
NotFoundException,
|
||||
ConflictException,
|
||||
ForbiddenException,
|
||||
BadRequestException,
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { InjectRepository, InjectDataSource } from '@nestjs/typeorm';
|
||||
import { Repository, DataSource, In } from 'typeorm';
|
||||
|
||||
import {
|
||||
|
|
@ -37,6 +38,7 @@ export class DuosService {
|
|||
private readonly logger = new Logger(DuosService.name);
|
||||
|
||||
constructor(
|
||||
@InjectDataSource()
|
||||
private readonly dataSource: DataSource,
|
||||
@InjectRepository(ProfileMembership)
|
||||
private readonly membershipRepo: Repository<ProfileMembership>,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {
|
|||
GoneException,
|
||||
BadRequestException,
|
||||
} from '@nestjs/common';
|
||||
import { InjectRepository } from '@nestjs/typeorm';
|
||||
import { InjectRepository, InjectDataSource } from '@nestjs/typeorm';
|
||||
import { Repository, DataSource } from 'typeorm';
|
||||
|
||||
import { DuoInvitation, InvitationStatus } from '@/entities/duo-invitation.entity';
|
||||
|
|
@ -63,6 +63,7 @@ export class InvitationLinkService {
|
|||
private readonly logger = new Logger(InvitationLinkService.name);
|
||||
|
||||
constructor(
|
||||
@InjectDataSource()
|
||||
private readonly dataSource: DataSource,
|
||||
@InjectRepository(DuoInvitation)
|
||||
private readonly duoInvitationRepo: Repository<DuoInvitation>,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue