fix: db service + disable whitelist

This commit is contained in:
2024-08-06 22:09:46 +00:00
parent 6d5cf0163c
commit c549e4b9d3
3 changed files with 9 additions and 8 deletions

View File

@@ -6,9 +6,10 @@ Requires=docker.service
[Service]
WorkingDirectory={{appRoot}}
ExecStart=/usr/bin/docker run --name venom-db -d \
--volume {{dbRoot}}/db:/data/db \
--volume {{dbRoot}}/configdb:/data/configdb \
ExecStart=/usr/bin/docker run --name venom-db \
--volume {{dbPath}}/db:/data/db \
--volume {{dbPath}}/configdb:/data/configdb \
-p 27017:27017 \
mongo:latest
ExecStop=/usr/bin/docker stop venom-db

View File

@@ -19,8 +19,8 @@ module.exports = {
templates: ['gen/services'],
subdir: false,
data: {
dbPath: process.env.DB_PATH,
appRoot: process.env.APP_ROOT,
dbPath: path.resolve(process.env.APP_ROOT ?? process.cwd(), process.env.DB_PATH),
},
name: '-',
},

View File

@@ -6,11 +6,11 @@ export async function isWhitelisted(
guild: Discord.Guild,
channel?: Discord.Channel,
): Promise<boolean> {
const guildValue = await getSetting<boolean | undefined>(`${prefix}.whitelist.${guild.id}`)
if (guildValue === false) {
return false
}
return true
// const guildValue = await getSetting<boolean | undefined>(`${prefix}.whitelist.${guild.id}`)
// if (guildValue === false) {
// return false
// }
// if (!channel) return guildValue ?? false
// const channelValue = await getSetting<boolean | undefined>(
// `${prefix}.whitelist.${guild.id}.${channel.id}`,