📃 feat: add list-balances, remove-user, and improve User scripts (#1418)

* Refactoring opening of DB to config/helpers.js

* Adding two user scripts:

- 'delete-user' to remove a user definitely
- 'list-balances' to show the balances of all the users
This commit is contained in:
Linus Gasser 2023-12-30 19:25:12 +01:00 committed by GitHub
parent 8735db0980
commit 1a95bef677
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 137 additions and 82 deletions

View file

@ -10,6 +10,7 @@
"scripts": {
"update": "node config/update.js",
"add-balance": "node config/add-balance.js",
"list-balances": "node config/list-balances.js",
"rebuild:package-lock": "node config/packages",
"reinstall": "node config/update.js -l -g",
"b:reinstall": "bun config/update.js -b -l -g",
@ -25,6 +26,7 @@
"upgrade": "node config/upgrade.js",
"create-user": "node config/create-user.js",
"ban-user": "node config/ban-user.js",
"delete-user": "node config/delete-user.js",
"backend": "cross-env NODE_ENV=production node api/server/index.js",
"backend:dev": "cross-env NODE_ENV=development npx nodemon api/server/index.js",
"backend:stop": "node config/stop-backend.js",
@ -53,7 +55,8 @@
"b:client:dev": "cd client && bun run b:dev",
"b:test:client": "cd client && bun run b:test",
"b:test:api": "cd api && bun run b:test",
"b:balance": "bun config/add-balance.js"
"b:balance": "bun config/add-balance.js",
"b:list-balances": "bun config/list-balances.js"
},
"repository": {
"type": "git",