edit and event details

This commit is contained in:
Harini312821
2024-07-31 02:03:56 +08:00
parent 8c0f68dab5
commit 649cdc6041
5 changed files with 156 additions and 148 deletions

View File

@@ -1,6 +1,5 @@
const { DataTypes } = require('sequelize');
module.exports = (sequelize) => {
const Events = sequelize.define("Events", {
title: {

262
server/pnpm-lock.yaml generated
View File

@@ -4,52 +4,55 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
dependencies:
argon2:
specifier: ^0.40.3
version: 0.40.3
axios:
specifier: ^1.7.2
version: 1.7.2
bad-words:
specifier: ^3.0.4
version: 3.0.4
cors:
specifier: ^2.8.5
version: 2.8.5
dotenv:
specifier: ^16.4.5
version: 16.4.5
express:
specifier: ^4.19.2
version: 4.19.2
jsonwebtoken:
specifier: ^9.0.2
version: 9.0.2
multer:
specifier: 1.4.5-lts.1
version: 1.4.5-lts.1
mysql2:
specifier: ^3.10.1
version: 3.10.1
nodemon:
specifier: ^3.1.3
version: 3.1.3
openai:
specifier: ^4.53.2
version: 4.53.2
sequelize:
specifier: ^6.37.3
version: 6.37.3(mysql2@3.10.1)
sharp:
specifier: ^0.33.4
version: 0.33.4
uuid:
specifier: ^10.0.0
version: 10.0.0
yup:
specifier: ^1.4.0
version: 1.4.0
importers:
.:
dependencies:
argon2:
specifier: ^0.40.3
version: 0.40.3
axios:
specifier: ^1.7.2
version: 1.7.2
bad-words:
specifier: ^3.0.4
version: 3.0.4
cors:
specifier: ^2.8.5
version: 2.8.5
dotenv:
specifier: ^16.4.5
version: 16.4.5
express:
specifier: ^4.19.2
version: 4.19.2
jsonwebtoken:
specifier: ^9.0.2
version: 9.0.2
multer:
specifier: 1.4.5-lts.1
version: 1.4.5-lts.1
mysql2:
specifier: ^3.10.1
version: 3.10.1
nodemon:
specifier: ^3.1.3
version: 3.1.3
openai:
specifier: ^4.53.2
version: 4.53.2
sequelize:
specifier: ^6.37.3
version: 6.37.3(mysql2@3.10.1)
sharp:
specifier: ^0.33.4
version: 0.33.4
uuid:
specifier: ^10.0.0
version: 10.0.0
yup:
specifier: ^1.4.0
version: 1.4.0
packages:
@@ -179,44 +182,31 @@ packages:
'@types/ms@0.7.34':
resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==}
/@types/node-fetch@2.6.11:
'@types/node-fetch@2.6.11':
resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==}
dependencies:
'@types/node': 20.14.6
form-data: 4.0.0
dev: false
/@types/node@18.19.42:
'@types/node@18.19.42':
resolution: {integrity: sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==}
dependencies:
undici-types: 5.26.5
dev: false
/@types/node@20.14.6:
'@types/node@20.14.6':
resolution: {integrity: sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==}
'@types/validator@13.12.0':
resolution: {integrity: sha512-nH45Lk7oPIJ1RVOF6JgFI6Dy0QpHEzq4QecZhvguxYPDwT8c93prCMqAtiIttm39voZ+DDR+qkNnMpJmMBRqag==}
/abort-controller@3.0.0:
abort-controller@3.0.0:
resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==}
engines: {node: '>=6.5'}
dependencies:
event-target-shim: 5.0.1
dev: false
/accepts@1.3.8:
accepts@1.3.8:
resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==}
engines: {node: '>= 0.6'}
/agentkeepalive@4.5.0:
agentkeepalive@4.5.0:
resolution: {integrity: sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==}
engines: {node: '>= 8.0.0'}
dependencies:
humanize-ms: 1.2.1
dev: false
/anymatch@3.1.3:
anymatch@3.1.3:
resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
engines: {node: '>= 8'}
@@ -403,12 +393,11 @@ packages:
resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
engines: {node: '>= 0.6'}
/event-target-shim@5.0.1:
event-target-shim@5.0.1:
resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==}
engines: {node: '>=6'}
dev: false
/express@4.19.2:
express@4.19.2:
resolution: {integrity: sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==}
engines: {node: '>= 0.10.0'}
@@ -429,23 +418,18 @@ packages:
debug:
optional: true
/form-data-encoder@1.7.2:
form-data-encoder@1.7.2:
resolution: {integrity: sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==}
dev: false
/form-data@4.0.0:
form-data@4.0.0:
resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==}
engines: {node: '>= 6'}
/formdata-node@4.4.1:
formdata-node@4.4.1:
resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==}
engines: {node: '>= 12.20'}
dependencies:
node-domexception: 1.0.0
web-streams-polyfill: 4.0.0-beta.3
dev: false
/forwarded@0.2.0:
forwarded@0.2.0:
resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==}
engines: {node: '>= 0.6'}
@@ -498,13 +482,10 @@ packages:
resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
engines: {node: '>= 0.8'}
/humanize-ms@1.2.1:
humanize-ms@1.2.1:
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
dependencies:
ms: 2.1.3
dev: false
/iconv-lite@0.4.24:
iconv-lite@0.4.24:
resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==}
engines: {node: '>=0.10.0'}
@@ -665,12 +646,11 @@ packages:
resolution: {integrity: sha512-ipO7rsHEBqa9STO5C5T10fj732ml+5kLN1cAG8/jdHd56ldQeGj3Q7+scUS+VHK/qy1zLEwC4wMK5+yM0btPvw==}
engines: {node: ^18 || ^20 || >= 21}
/node-domexception@1.0.0:
node-domexception@1.0.0:
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
engines: {node: '>=10.5.0'}
dev: false
/node-fetch@2.7.0:
node-fetch@2.7.0:
resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
engines: {node: 4.x || >=6.0.0}
peerDependencies:
@@ -678,11 +658,8 @@ packages:
peerDependenciesMeta:
encoding:
optional: true
dependencies:
whatwg-url: 5.0.0
dev: false
/node-gyp-build@4.8.1:
node-gyp-build@4.8.1:
resolution: {integrity: sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==}
hasBin: true
@@ -706,22 +683,11 @@ packages:
resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}
engines: {node: '>= 0.8'}
/openai@4.53.2:
openai@4.53.2:
resolution: {integrity: sha512-ohYEv6OV3jsFGqNrgolDDWN6Ssx1nFg6JDJQuaBFo4SL2i+MBoOQ16n2Pq1iBF5lH1PKnfCIOfqAGkmzPvdB9g==}
hasBin: true
dependencies:
'@types/node': 18.19.42
'@types/node-fetch': 2.6.11
abort-controller: 3.0.0
agentkeepalive: 4.5.0
form-data-encoder: 1.7.2
formdata-node: 4.4.1
node-fetch: 2.7.0
transitivePeerDependencies:
- encoding
dev: false
/parseurl@1.3.3:
parseurl@1.3.3:
resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}
engines: {node: '>= 0.8'}
@@ -897,6 +863,9 @@ packages:
resolution: {integrity: sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==}
hasBin: true
tr46@0.0.3:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
tslib@2.6.3:
resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==}
@@ -944,6 +913,16 @@ packages:
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
web-streams-polyfill@4.0.0-beta.3:
resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==}
engines: {node: '>= 14'}
webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
whatwg-url@5.0.0:
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
wkx@0.5.0:
resolution: {integrity: sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==}
@@ -1044,17 +1023,34 @@ snapshots:
'@types/ms@0.7.34': {}
'@types/node-fetch@2.6.11':
dependencies:
'@types/node': 20.14.6
form-data: 4.0.0
'@types/node@18.19.42':
dependencies:
undici-types: 5.26.5
'@types/node@20.14.6':
dependencies:
undici-types: 5.26.5
'@types/validator@13.12.0': {}
abort-controller@3.0.0:
dependencies:
event-target-shim: 5.0.1
accepts@1.3.8:
dependencies:
mime-types: 2.1.35
negotiator: 0.6.3
agentkeepalive@4.5.0:
dependencies:
humanize-ms: 1.2.1
anymatch@3.1.3:
dependencies:
normalize-path: 3.0.0
@@ -1199,6 +1195,7 @@ snapshots:
debug@4.3.5(supports-color@5.5.0):
dependencies:
ms: 2.1.2
optionalDependencies:
supports-color: 5.5.0
define-data-property@1.1.4:
@@ -1239,6 +1236,8 @@ snapshots:
etag@1.8.1: {}
event-target-shim@5.0.1: {}
express@4.19.2:
dependencies:
accepts: 1.3.8
@@ -1293,12 +1292,19 @@ snapshots:
follow-redirects@1.15.6: {}
form-data-encoder@1.7.2: {}
form-data@4.0.0:
dependencies:
asynckit: 0.4.0
combined-stream: 1.0.8
mime-types: 2.1.35
formdata-node@4.4.1:
dependencies:
node-domexception: 1.0.0
web-streams-polyfill: 4.0.0-beta.3
forwarded@0.2.0: {}
fresh@0.5.2: {}
@@ -1350,6 +1356,10 @@ snapshots:
statuses: 2.0.1
toidentifier: 1.0.1
humanize-ms@1.2.1:
dependencies:
ms: 2.1.3
iconv-lite@0.4.24:
dependencies:
safer-buffer: 2.1.2
@@ -1495,6 +1505,12 @@ snapshots:
node-addon-api@8.0.0: {}
node-domexception@1.0.0: {}
node-fetch@2.7.0:
dependencies:
whatwg-url: 5.0.0
node-gyp-build@4.8.1: {}
nodemon@3.1.3:
@@ -1520,6 +1536,18 @@ snapshots:
dependencies:
ee-first: 1.1.1
openai@4.53.2:
dependencies:
'@types/node': 18.19.42
'@types/node-fetch': 2.6.11
abort-controller: 3.0.0
agentkeepalive: 4.5.0
form-data-encoder: 1.7.2
formdata-node: 4.4.1
node-fetch: 2.7.0
transitivePeerDependencies:
- encoding
parseurl@1.3.3: {}
path-to-regexp@0.1.7: {}
@@ -1610,7 +1638,6 @@ snapshots:
lodash: 4.17.21
moment: 2.30.1
moment-timezone: 0.5.45
mysql2: 3.10.1
pg-connection-string: 2.6.4
retry-as-promised: 7.0.4
semver: 7.6.2
@@ -1619,6 +1646,8 @@ snapshots:
uuid: 8.3.2
validator: 13.12.0
wkx: 0.5.0
optionalDependencies:
mysql2: 3.10.1
transitivePeerDependencies:
- supports-color
@@ -1711,14 +1740,9 @@ snapshots:
touch@3.1.1: {}
/tr46@0.0.3:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
dev: false
tr46@0.0.3: {}
/tslib@2.6.3:
resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==}
requiresBuild: true
dev: false
tslib@2.6.3:
optional: true
type-fest@2.19.0: {}
@@ -1748,24 +1772,16 @@ snapshots:
vary@1.1.2: {}
/web-streams-polyfill@4.0.0-beta.3:
resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==}
engines: {node: '>= 14'}
dev: false
web-streams-polyfill@4.0.0-beta.3: {}
/webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
dev: false
webidl-conversions@3.0.1: {}
/whatwg-url@5.0.0:
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
whatwg-url@5.0.0:
dependencies:
tr46: 0.0.3
webidl-conversions: 3.0.1
dev: false
/wkx@0.5.0:
resolution: {integrity: sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg==}
wkx@0.5.0:
dependencies:
'@types/node': 20.14.6