diff --git a/.vscode/settings.json b/.vscode/settings.json index 297b8d0..5a976ad 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "workbench.colorCustomizations": { - "activityBar.background": "#4C1F25", - "titleBar.activeBackground": "#6A2C34", - "titleBar.activeForeground": "#FEFCFC" + "activityBar.background": "#521342", + "titleBar.activeBackground": "#731B5D", + "titleBar.activeForeground": "#FDF8FC" } } \ No newline at end of file diff --git a/pages/api/superadmin/index.ts b/pages/api/superadmin/index.ts new file mode 100644 index 0000000..5feae3f --- /dev/null +++ b/pages/api/superadmin/index.ts @@ -0,0 +1,36 @@ + +import { NextApiRequest, NextApiResponse } from 'next'; +import { getSession } from 'next-auth/react'; +import { Role } from '../../../enum/role.enum'; +import prisma from '../../../lib/prisma'; + + +//api qui va rendre un utilisateur super admin (pour les developpeurs) +//--> http://localhost:3000/api/superadmin?pass=1234 (a effacer) + +export default async function makeMeSuper(req: NextApiRequest, res: NextApiResponse) { + const { pass } = req.query; + const session = await getSession({ req }) + const goodPassword = pass === '1234'; + + //si utilisateur connecté et que le parametre 'pass' est '1234' + if (session && goodPassword) { + + //MAJ de l'utilisateur en superadmin + await prisma.user.update({ + where: { email: session.user.email }, + data: { + role: Role.SUPERADMIN, + }, + }) + return res.status(200).send({ message: 'Profiled updated welcome SUPERADMIN !' }); + } else { + res.status(401).send({ message: 'Unauthorized' }) + } +} + + + + + + diff --git a/public/images/coffret-degustation.webp b/public/images/coffret-degustation.webp new file mode 100644 index 0000000..2c95ecd Binary files /dev/null and b/public/images/coffret-degustation.webp differ diff --git a/public/images/coffret-degustation2.webp b/public/images/coffret-degustation2.webp new file mode 100644 index 0000000..d2baadf Binary files /dev/null and b/public/images/coffret-degustation2.webp differ diff --git a/public/images/infuseur.webp b/public/images/infuseur.webp new file mode 100644 index 0000000..ef15382 Binary files /dev/null and b/public/images/infuseur.webp differ diff --git a/public/images/old/coffret-degustation.webp b/public/images/old/coffret-degustation.webp new file mode 100644 index 0000000..3606c5a Binary files /dev/null and b/public/images/old/coffret-degustation.webp differ diff --git a/public/images/old/coffret-degustation2.webp b/public/images/old/coffret-degustation2.webp new file mode 100644 index 0000000..de1d6c8 Binary files /dev/null and b/public/images/old/coffret-degustation2.webp differ diff --git a/public/images/old/coffret-the-PhotoRoom.png b/public/images/old/coffret-the-PhotoRoom.png new file mode 100644 index 0000000..0ced5a3 Binary files /dev/null and b/public/images/old/coffret-the-PhotoRoom.png differ diff --git a/public/images/old/the-detox.webp b/public/images/old/the-detox.webp new file mode 100644 index 0000000..e23f5a2 Binary files /dev/null and b/public/images/old/the-detox.webp differ diff --git a/public/images/old/the-signature.webp b/public/images/old/the-signature.webp new file mode 100644 index 0000000..6b32775 Binary files /dev/null and b/public/images/old/the-signature.webp differ diff --git a/public/images/png/coffret-the.png b/public/images/png/coffret-the.png new file mode 100644 index 0000000..7e8f06f Binary files /dev/null and b/public/images/png/coffret-the.png differ diff --git a/public/images/png/infuseur.png b/public/images/png/infuseur.png new file mode 100644 index 0000000..65660a0 Binary files /dev/null and b/public/images/png/infuseur.png differ diff --git a/public/images/png/the-detox.png b/public/images/png/the-detox.png new file mode 100644 index 0000000..7c681e6 Binary files /dev/null and b/public/images/png/the-detox.png differ diff --git a/public/images/png/the-signature.png b/public/images/png/the-signature.png new file mode 100644 index 0000000..faf6010 Binary files /dev/null and b/public/images/png/the-signature.png differ diff --git a/public/images/the-detox.webp b/public/images/the-detox.webp new file mode 100644 index 0000000..f29cd5d Binary files /dev/null and b/public/images/the-detox.webp differ diff --git a/public/images/the-signature.webp b/public/images/the-signature.webp new file mode 100644 index 0000000..ad3aa2f Binary files /dev/null and b/public/images/the-signature.webp differ