Compare commits

..

No commits in common. 'master' and 'feature/apigain' have entirely different histories.

2
Jenkinsfile vendored

@ -5,7 +5,7 @@ pipeline {
steps {
sh '''echo "
NEXTAUTH_URL=\'https://devops.dsp-archiwebo21-ad-ec-cb-mt.fr\'
DATABASE_URL="postgres://postgres:dandanalaa@127.0.0.1:5454/thetiptop"
DATABASE_URL="postgres://postgres:dandanalaa@212.227.206.140:5454/thetiptop"
GITHUB_ID=YOUR_GITHUB_CLIENT_ID
GITHUB_SECRET=YOUR_GITHUB_CLIENT_SECRET

@ -1,5 +0,0 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.NEXTAUTH_URL || 'https://dsp-archiwebo21-ad-ec-cb-mt.fr/',
generateRobotsTxt: true
}

58
package-lock.json generated

@ -22,7 +22,6 @@
"js-confetti": "^0.11.0",
"next": "13.0.2",
"next-auth": "4.16.4",
"next-sitemap": "^3.1.42",
"nodemailer": "^6.8.0",
"react": "18.2.0",
"react-chartjs-2": "^5.0.1",
@ -668,11 +667,6 @@
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
"dev": true
},
"node_modules/@corex/deepmerge": {
"version": "4.0.29",
"resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.29.tgz",
"integrity": "sha512-q/yVUnqckA8Do+EvAfpy7RLdumnBy9ZsducMUtZTvpdbJC7azEf1hGtnYYxm0QfphYxjwggv6XtH64prvS1W+A=="
},
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
@ -6430,14 +6424,6 @@
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
@ -6586,31 +6572,6 @@
"url": "https://github.com/sponsors/panva"
}
},
"node_modules/next-sitemap": {
"version": "3.1.42",
"resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-3.1.42.tgz",
"integrity": "sha512-z/m440ZDCTxoE3FWbBWZLK66ZEh9e2R+j/Bm0d1Vo4PFkMi4yhWdIjWqhj//kyFyBvMYk3YWs8QQqVCCe15E6g==",
"funding": [
{
"url": "https://github.com/iamvishnusankar/next-sitemap.git"
}
],
"dependencies": {
"@corex/deepmerge": "^4.0.29",
"minimist": "^1.2.7"
},
"bin": {
"next-sitemap": "bin/next-sitemap.mjs",
"next-sitemap-cjs": "bin/next-sitemap.cjs"
},
"engines": {
"node": ">=14.18"
},
"peerDependencies": {
"@next/env": "*",
"next": "*"
}
},
"node_modules/nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
@ -9428,11 +9389,6 @@
"integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
"dev": true
},
"@corex/deepmerge": {
"version": "4.0.29",
"resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.29.tgz",
"integrity": "sha512-q/yVUnqckA8Do+EvAfpy7RLdumnBy9ZsducMUtZTvpdbJC7azEf1hGtnYYxm0QfphYxjwggv6XtH64prvS1W+A=="
},
"@cspotcode/source-map-support": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
@ -13629,11 +13585,6 @@
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz",
"integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g=="
},
"mkdirp": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
@ -13726,15 +13677,6 @@
}
}
},
"next-sitemap": {
"version": "3.1.42",
"resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-3.1.42.tgz",
"integrity": "sha512-z/m440ZDCTxoE3FWbBWZLK66ZEh9e2R+j/Bm0d1Vo4PFkMi4yhWdIjWqhj//kyFyBvMYk3YWs8QQqVCCe15E6g==",
"requires": {
"@corex/deepmerge": "^4.0.29",
"minimist": "^1.2.7"
}
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",

@ -10,8 +10,7 @@
"build": "next build",
"start": "next start",
"db": "npx prisma migrate reset --force",
"test": "playwright test",
"postbuild": "next-sitemap"
"test": "playwright test"
},
"dependencies": {
"@hookform/resolvers": "^2.9.10",
@ -27,7 +26,6 @@
"js-confetti": "^0.11.0",
"next": "13.0.2",
"next-auth": "4.16.4",
"next-sitemap": "^3.1.42",
"nodemailer": "^6.8.0",
"react": "18.2.0",
"react-chartjs-2": "^5.0.1",

@ -59,7 +59,8 @@ export async function getServerSideProps(context) {
const users = await prisma.user.findMany({
include: {
gains: true
}
},
take: 5
});
const user = await prisma.user.findUnique({
@ -70,6 +71,7 @@ export async function getServerSideProps(context) {
const ticketRestants = await prisma.gain.count({
where: {
codeActif: true,
dateAchat: {
not: null,
}
@ -88,6 +90,8 @@ export async function getServerSideProps(context) {
},
})
console.log("🚀 ~ file: admin.tsx:87 ~ getServerSideProps ~ gainsRetires", gainsRetires)
const produits = await prisma.produit.findMany({})
return {

@ -157,7 +157,7 @@ const Index = () => {
<div className={`${style['imageWrapper']}`}>
<Image
src={testerCodeCadeau}
alt="Tester le code cadeau"
alt="thetiptop navigation logo"
layout="responsive"
className={`${style['rotatingImage']}`}
/>

@ -1,11 +0,0 @@
# *
User-agent: *
Allow: /*
Disallow: /admin
Disallow: /mon-compte
# Host
Host: https://dsp-archiwebo21-ad-ec-cb-mt.fr
# Sitemaps
Sitemap: https://dsp-archiwebo21-ad-ec-cb-mt.fr/sitemap.xml

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/admin</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/auth-error</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/cgu</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/connexion</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/contact</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/mentions-legales</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/mon-compte</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/tout-savoir</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
<url><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/verify-request</loc><lastmod>2022-12-15T20:38:21.840Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
</urlset>

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://dsp-archiwebo21-ad-ec-cb-mt.fr/sitemap-0.xml</loc></sitemap>
</sitemapindex>

@ -1,18 +1,29 @@
#!/usr/bin/env sh
echo 'The following "npm" command builds your Node.js/React application for'
echo 'production in the local "build" directory (i.e. within the'
echo '"/var/jenkins_home/workspace/simple-node-js-react-app" directory),'
echo 'correctly bundles React in production mode and optimizes the build for'
echo 'the best performance.'
set -x
npm run build
set +x
echo 'The following "npm" command runs your Node.js/React application in'
echo 'development mode and makes the application available for web browsing.'
echo 'The "npm start" command has a trailing ampersand so that the command runs'
echo 'as a background process (i.e. asynchronously). Otherwise, this command'
echo 'can pause running builds of CI/CD applications indefinitely. "npm start"'
echo 'is followed by another command that retrieves the process ID (PID) value'
echo 'of the previously run process (i.e. "npm start") and writes this value to'
echo 'the file ".pidfile".'
set -x
npm start &
sleep 1
echo $! > .pidfile
set +x
echo 'Maintenant...'
echo 'Visiter https://devops.dsp-archiwebo21-ad-ec-cb-mt.fr/ '
echo 'L_application tourne sur le docker jenkins sur via le port 3000 voici un ip a'
ip a
echo 'Pour fermer l_application a appuyer sur le bouton proced'
echo 'Now...'
echo 'Visit http://localhost:3000 to see your Node.js/React application in action.'
echo '(This is why you specified the "args ''-p 3000:3000''" parameter when you'
echo 'created your initial Pipeline as a Jenkinsfile.)'
Loading…
Cancel
Save