Skip to content

Commit c37616f

Browse files
made changes
1 parent dc2b17a commit c37616f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

index.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ const __filename = fileURLToPath(import.meta.url);
1212
const __dirname = path.dirname(__filename);
1313
const envFilePath = path.join(__dirname, "env", ".env");
1414
dotenv.config({ path: envFilePath });
15+
16+
export const config = {
17+
formWebhookUrl: process.env.formWebhookUrl,
18+
apiWebhookUrl: process.env.apiWebhookUrl,
19+
authUser: process.env.authUser,
20+
authPass: process.env.authPass,
21+
};
22+
1523
app.set("view engine", "ejs");
1624
app.set("views", path.join(__dirname, "views"));
1725

@@ -47,10 +55,3 @@ requiredEnvVars.forEach((varName) => {
4755
app.listen(port, () => {
4856
console.log(`Servidor escuchando en http://localhost:${port}`);
4957
});
50-
51-
export const config = {
52-
formWebhookUrl: process.env.formWebhookUrl,
53-
apiWebhookUrl: process.env.apiWebhookUrl,
54-
authUser: process.env.authUser,
55-
authPass: process.env.authPass,
56-
};

utils/webhook.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { WebhookClient, EmbedBuilder } from "discord.js";
22
import { config } from "../index.js";
3-
console.log(config);
43

54
export function formSend(data) {
65
const webhook = new WebhookClient({

0 commit comments

Comments
 (0)