master
Eric 4 years ago
parent e73b280ea5
commit 8c13aa4591

@ -64,22 +64,22 @@ app.get('/generate', async (req: Request, res: Response,) => {
return res.status(401).json({ message: 'Unauthorized' }) return res.status(401).json({ message: 'Unauthorized' })
} }
try { try {
makeGain(100, Cadeaux.GrandCoffretDecouverte) await makeGain(100, Cadeaux.GrandCoffretDecouverte)
// makeGain(60000, Cadeaux.GrandCoffretDecouverte) await makeGain(60000, Cadeaux.GrandCoffretDecouverte)
// makeGain(90000, Cadeaux.CoffretDecouverte) await makeGain(90000, Cadeaux.CoffretDecouverte)
// makeGain(150000, Cadeaux.TheSignature) await makeGain(150000, Cadeaux.TheSignature)
// for (let i = 0; i < 2; i++) { for (let i = 0; i < 2; i++) {
// makeGain(150000, Cadeaux.TheDetox) await makeGain(150000, Cadeaux.TheDetox)
// } }
// for (let i = 0; i < 6; i++) { for (let i = 0; i < 6; i++) {
// makeGain(150000, Cadeaux.Infuseur) await makeGain(150000, Cadeaux.Infuseur)
// } }
const totalGains = await prisma.gain.count({}) const totalGains = await prisma.gain.count()
console.log('total', totalGains); console.log('total', totalGains);

@ -25,6 +25,9 @@ export const makeGain = async (nbrGain: number, idProduit: number) => {
console.log(`produit : ${Cadeaux[idProduit]}, n° : ${i}`) console.log(`produit : ${Cadeaux[idProduit]}, n° : ${i}`)
} }
setTimeout(() => {
console.log('wait...')
}, 1000)
@ -32,5 +35,5 @@ export const makeGain = async (nbrGain: number, idProduit: number) => {
data: generatedGains data: generatedGains
}) })
console.log('YEYEEEEEEEEEEEEE', res); console.log('Gain created !', res);
} }

Loading…
Cancel
Save