Browse Source

Clean up

pull/4469/head
Thomas Kaul 3 weeks ago
parent
commit
5d79f7c9cf
  1. 34
      apps/api/src/services/symbol-profile/symbol-profile.service.ts

34
apps/api/src/services/symbol-profile/symbol-profile.service.ts

@ -126,40 +126,6 @@ export class SymbolProfileService {
});
}
public async getSymbolProfilesByUserSubscription({
withUserSubscription = false
}: {
withUserSubscription?: boolean;
}) {
return this.prismaService.symbolProfile.findMany({
include: {
Order: {
include: {
User: true
}
}
},
orderBy: [{ symbol: 'asc' }],
where: {
Order: withUserSubscription
? {
some: {
User: {
Subscription: { some: { expiresAt: { gt: new Date() } } }
}
}
}
: {
every: {
User: {
Subscription: { none: { expiresAt: { gt: new Date() } } }
}
}
}
}
});
}
public updateAssetProfileIdentifier(
oldAssetProfileIdentifier: AssetProfileIdentifier,
newAssetProfileIdentifier: AssetProfileIdentifier

Loading…
Cancel
Save