|
|
@ -326,8 +326,12 @@ export class GhostfolioService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public async incrementDailyRequests({ userId }: { userId: string }) { |
|
|
public async incrementDailyRequests({ userId }: { userId: string }) { |
|
|
await this.prismaService.analytics.update({ |
|
|
await this.prismaService.analytics.upsert({ |
|
|
data: { |
|
|
create: { |
|
|
|
|
|
dataProviderGhostfolioDailyRequests: 1, |
|
|
|
|
|
user: { connect: { id: userId } } |
|
|
|
|
|
}, |
|
|
|
|
|
update: { |
|
|
dataProviderGhostfolioDailyRequests: { increment: 1 } |
|
|
dataProviderGhostfolioDailyRequests: { increment: 1 } |
|
|
}, |
|
|
}, |
|
|
where: { userId } |
|
|
where: { userId } |
|
|
|