()
| 86 | const attempts = usage.count; |
| 87 | |
| 88 | const rollbackUsage = async () => { |
| 89 | await fastify.prisma.socratesUsage.update({ |
| 90 | where: { |
| 91 | userId_date: { userId: req.user!.id, date: todayUTC } |
| 92 | }, |
| 93 | data: { count: { decrement: 1 } } |
| 94 | }); |
| 95 | }; |
| 96 | |
| 97 | try { |
| 98 | const response = await fetch(`${SOCRATES_ENDPOINT}/hint`, { |