Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

fix: mongo does not need cert file #792

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/database/connectDb.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs from 'fs';

Check warning on line 1 in src/database/connectDb.ts

View workflow job for this annotation

GitHub Actions / lint

'fs' is defined but never used

Check warning on line 1 in src/database/connectDb.ts

View workflow job for this annotation

GitHub Actions / lint

'fs' is defined but never used
import { connect } from 'mongoose';
import { ExtendedClient } from '../interfaces/ExtendedClient';
import { errorHandler } from '../utils/errorHandler';
Expand All @@ -6,7 +6,7 @@
export const connectDb = async (bot: ExtendedClient) => {
// DigitalOcean Apps has cert as environment variable but Mongo needs a file path
// Write Mongo cert file to disk
fs.writeFileSync('cert.pem', process.env.CA_CERT!);
// fs.writeFileSync('cert.pem', process.env.CA_CERT!); no longer needed should remove

try {
await connect(bot.config.dbUri);
Expand Down
Loading