package updates

This commit is contained in:
Kaushik Narayan R 2024-08-14 16:11:46 +05:30
parent 41fff1d406
commit 1abcb3ac4e
3 changed files with 77 additions and 48 deletions

View File

@ -118,6 +118,8 @@ const addItemsToPlaylist = async (req, res, nextBatch, playlistID) => {
}
const removeItemsFromPlaylist = async (req, res, nextBatch, playlistID, snapshotID) => {
// API doesn't document this kind of deletion via the 'positions' field
// but see here: https://github.com/spotipy-dev/spotipy/issues/95#issuecomment-2263634801
const response = await singleRequest(req, res,
"DELETE",
`/playlists/${playlistID}/tracks`,

100
package-lock.json generated
View File

@ -9,24 +9,27 @@
"version": "0",
"license": "MIT",
"dependencies": {
"axios": "^1.5.0",
"axios": "^1.7.4",
"connect-sqlite3": "^0.9.15",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv-flow": "^3.3.0",
"express": "^4.18.2",
"express-session": "^1.17.3",
"express-validator": "^7.0.1",
"helmet": "^7.0.0",
"dotenv-flow": "^4.1.0",
"express": "^4.19.2",
"express-session": "^1.18.0",
"express-validator": "^7.2.0",
"helmet": "^7.1.0",
"pg": "^8.12.0",
"sequelize": "^6.37.3",
"winston": "^3.10.0"
"serializr": "^3.0.2",
"winston": "^3.14.1"
},
"devDependencies": {
"@types/express": "^4.17.18",
"@types/express": "^4.17.21",
"@types/node": "^22.2.0",
"cross-env": "^7.0.3",
"nodemon": "^3.0.1",
"sequelize-cli": "^6.6.2"
"nodemon": "^3.1.4",
"sequelize-cli": "^6.6.2",
"typescript": "^5.5.4"
}
},
"node_modules/@colors/colors": {
@ -188,11 +191,11 @@
"integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g=="
},
"node_modules/@types/node": {
"version": "22.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz",
"integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==",
"version": "22.3.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.3.0.tgz",
"integrity": "sha512-nrWpWVaDZuaVc5X84xJ0vNrLvomM205oQyLsRt7OHNZbSHslcWsvgFR7O7hire2ZonjLrWBbedmotmIlJDVd6g==",
"dependencies": {
"undici-types": "~6.13.0"
"undici-types": "~6.18.2"
}
},
"node_modules/@types/qs": {
@ -401,9 +404,9 @@
}
},
"node_modules/axios": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.3.tgz",
"integrity": "sha512-Ar7ND9pU99eJ9GpoGQKhKf58GpUOgnzuaB7ueNQ5BMi0p+LZ5oaEnfF999fAArcTIBwXTCHAmGcHOZJaWPq9Nw==",
"version": "1.7.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
"integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
"dependencies": {
"follow-redirects": "^1.15.6",
"form-data": "^4.0.0",
@ -1087,22 +1090,25 @@
}
},
"node_modules/dotenv": {
"version": "8.6.0",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz",
"integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==",
"version": "16.4.5",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
"engines": {
"node": ">=10"
"node": ">=12"
},
"funding": {
"url": "https://dotenvx.com"
}
},
"node_modules/dotenv-flow": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/dotenv-flow/-/dotenv-flow-3.3.0.tgz",
"integrity": "sha512-GLSvRqDZ1TGhloS6ZCZ5chdqqv/3XMqZxAnX9rliJiHn6uyJLguKeu+3M2kcagBkoVCnLWYfbR4rfFe1xSU39A==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/dotenv-flow/-/dotenv-flow-4.1.0.tgz",
"integrity": "sha512-0cwP9jpQBQfyHwvE0cRhraZMkdV45TQedA8AAUZMsFzvmLcQyc1HPv+oX0OOYwLFjIlvgVepQ+WuQHbqDaHJZg==",
"dependencies": {
"dotenv": "^8.6.0"
"dotenv": "^16.0.0"
},
"engines": {
"node": ">= 8.0.0"
"node": ">= 12.0.0"
}
},
"node_modules/dottie": {
@ -1425,9 +1431,9 @@
"integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA=="
},
"node_modules/express-validator": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/express-validator/-/express-validator-7.1.0.tgz",
"integrity": "sha512-ePn6NXjHRZiZkwTiU1Rl2hy6aUqmi6Cb4/s8sfUsKH7j2yYl9azSpl8xEHcOj1grzzQ+UBEoLWtE1s6FDxW++g==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/express-validator/-/express-validator-7.2.0.tgz",
"integrity": "sha512-I2ByKD8panjtr8Y05l21Wph9xk7kk64UMyvJCl/fFM/3CTJq8isXYPLeKW/aZBCdb/LYNv63PwhY8khw8VWocA==",
"dependencies": {
"lodash": "^4.17.21",
"validator": "~13.12.0"
@ -1517,9 +1523,9 @@
}
},
"node_modules/foreground-child": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz",
"integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz",
"integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==",
"dev": true,
"dependencies": {
"cross-spawn": "^7.0.0",
@ -3514,6 +3520,11 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/serializr": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/serializr/-/serializr-3.0.2.tgz",
"integrity": "sha512-bCACTuCiAEjtk1NxkATc3yz2j/8OoaWYxRkC4D5yq0ikZeLO7KLmmI/owmvJ/N4vS9SX4fZTXgSmsNzWtxDJ/Q=="
},
"node_modules/serve-static": {
"version": "1.15.0",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz",
@ -4086,6 +4097,19 @@
"node": ">= 0.6"
}
},
"node_modules/typescript": {
"version": "5.5.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
"integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/uid-safe": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",
@ -4116,9 +4140,9 @@
"dev": true
},
"node_modules/undici-types": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.13.0.tgz",
"integrity": "sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg=="
"version": "6.18.2",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.18.2.tgz",
"integrity": "sha512-5ruQbENj95yDYJNS3TvcaxPMshV7aizdv/hWYjGIKoANWKjhWNBsr2YEuYZKodQulB1b8l7ILOuDQep3afowQQ=="
},
"node_modules/unique-filename": {
"version": "1.1.1",
@ -4258,9 +4282,9 @@
}
},
"node_modules/winston": {
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/winston/-/winston-3.13.1.tgz",
"integrity": "sha512-SvZit7VFNvXRzbqGHsv5KSmgbEYR5EiQfDAL9gxYkRqa934Hnk++zze0wANKtMHcy/gI4W/3xmSDwlhf865WGw==",
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/winston/-/winston-3.14.1.tgz",
"integrity": "sha512-CJi4Il/msz8HkdDfXOMu+r5Au/oyEjFiOZzbX2d23hRLY0narGjqfE5lFlrT5hfYJhPtM8b85/GNFsxIML/RVA==",
"dependencies": {
"@colors/colors": "^1.6.0",
"@dabh/diagnostics": "^2.0.2",

View File

@ -18,23 +18,26 @@
},
"homepage": "https://github.com/20kaushik02/spotify-manager#readme",
"dependencies": {
"axios": "^1.5.0",
"axios": "^1.7.4",
"connect-sqlite3": "^0.9.15",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"dotenv-flow": "^3.3.0",
"express": "^4.18.2",
"express-session": "^1.17.3",
"express-validator": "^7.0.1",
"helmet": "^7.0.0",
"dotenv-flow": "^4.1.0",
"express": "^4.19.2",
"express-session": "^1.18.0",
"express-validator": "^7.2.0",
"helmet": "^7.1.0",
"pg": "^8.12.0",
"sequelize": "^6.37.3",
"winston": "^3.10.0"
"serializr": "^3.0.2",
"winston": "^3.14.1"
},
"devDependencies": {
"@types/express": "^4.17.18",
"@types/express": "^4.17.21",
"@types/node": "^22.2.0",
"cross-env": "^7.0.3",
"nodemon": "^3.0.1",
"sequelize-cli": "^6.6.2"
"nodemon": "^3.1.4",
"sequelize-cli": "^6.6.2",
"typescript": "^5.5.4"
}
}