summaryrefslogtreecommitdiff
path: root/scripts/shop.js
diff options
context:
space:
mode:
authorMhykol <mchaeldonald62@pm.me>2024-05-27 10:47:21 -0400
committerMhykol <mchaeldonald62@pm.me>2024-05-27 10:47:21 -0400
commita13a1045dca2fa2c70617d853b7bd08c34c3cffe (patch)
tree2ae7e0cdc60f3b8adf576f6ae560870e54665bfe /scripts/shop.js
parent2bbec83695a4d1df6d0bb8455146af996ac00293 (diff)
Stop tracking scripts directory
Diffstat (limited to 'scripts/shop.js')
-rw-r--r--scripts/shop.js51
1 files changed, 0 insertions, 51 deletions
diff --git a/scripts/shop.js b/scripts/shop.js
deleted file mode 100644
index e75d289..0000000
--- a/scripts/shop.js
+++ /dev/null
@@ -1,51 +0,0 @@
-const database = require('../source/database')
-const estore = database('EStore')
-
-class Shop {
- constructor() {}
-
- async Main() {
- return estore.Query('SELECT * FROM Products').then(output => {
- const data = {
- start: `
- <section id='shop'>
- <div>
- <h1>This is the Shop page</h1>
- `,
- body: '',
- end: `
- </div>
- </section>
- `
- }
- if (output) {
- for (let i = 0; i < output[0].length; i++) {
- data.body += `
- <div class='item'>
- <h2>${output[0][i].ProductName}</h2>
- <p>ID: ${output[0][i].ID}</p>
- </div>
- `
- }
- } else {
- data.body = `
- There are no items in the database.
- `
- }
- return data.start + data.body + data.end
- })
- }
- Product() {
- const data = `
- <section id='product'>
- <div>
- <h1>This is the Product page</h1>
- <p>Description</p>
- </div>
- </section>
- `
- return data
- }
-}
-
-module.exports = () => {return new Shop()}