mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 09:23:07 +02:00
Fix env
`PUBLIC` is a path to the Public user dir on Windows, and !! does not convert a string to a boolean as expected
This commit is contained in:
parent
34a4e071b5
commit
b1965909e6
@ -42,6 +42,7 @@
|
|||||||
"@fastify/jwt": "^5.0.1",
|
"@fastify/jwt": "^5.0.1",
|
||||||
"@fastify/oauth2": "^5.1.0",
|
"@fastify/oauth2": "^5.1.0",
|
||||||
"@prisma/client": "^4.1.1",
|
"@prisma/client": "^4.1.1",
|
||||||
|
"boolean": "^3.2.0",
|
||||||
"cryptr": "^6.0.3",
|
"cryptr": "^6.0.3",
|
||||||
"discord.js": "^14.1.2",
|
"discord.js": "^14.1.2",
|
||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.1",
|
||||||
|
@ -10,7 +10,7 @@ const env = {
|
|||||||
HTTP_BIND: 8080,
|
HTTP_BIND: 8080,
|
||||||
HTTP_EXTERNAL: 'http://localhost:8080',
|
HTTP_EXTERNAL: 'http://localhost:8080',
|
||||||
PORTAL: '',
|
PORTAL: '',
|
||||||
PUBLIC: false,
|
PUBLIC_BOT: false,
|
||||||
SUPER: '319467558166069248',
|
SUPER: '319467558166069248',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
const ms = require('ms');
|
const ms = require('ms');
|
||||||
|
const { boolean } = require('boolean');
|
||||||
|
|
||||||
module.exports.get = () => ({
|
module.exports.get = () => ({
|
||||||
handler: async (req, res) => {
|
handler: async (req, res) => {
|
||||||
@ -21,7 +22,7 @@ module.exports.get = () => ({
|
|||||||
discriminator: client.user.discriminator,
|
discriminator: client.user.discriminator,
|
||||||
id: client.user.id,
|
id: client.user.id,
|
||||||
portal: process.env.PORTAL || null,
|
portal: process.env.PORTAL || null,
|
||||||
public: !!process.env.PUBLIC,
|
public: boolean(process.env.PUBLIC_BOT),
|
||||||
stats: {
|
stats: {
|
||||||
activatedUsers: users.length,
|
activatedUsers: users.length,
|
||||||
archivedMessages: users.reduce((total, user) => total + user.messageCount, 0), // don't count archivedMessage table rows, they can be deleted
|
archivedMessages: users.reduce((total, user) => total + user.messageCount, 0), // don't count archivedMessage table rows, they can be deleted
|
||||||
|
Loading…
Reference in New Issue
Block a user