Add Discord notifications for image generation and snapshot creation
This commit is contained in:
10
api.js
10
api.js
@@ -3,10 +3,10 @@ const cors = require('cors');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
const { initPool, renderHtml, POOL_SIZE } = require('./browserPool');
|
||||
const v2Routes = require('./v2Routes');
|
||||
const { cleanupExpiredSessions, cleanupExpiredSnapshots } = require('./db');
|
||||
const { notifyImageGenerated } = require('./discordWebhook');
|
||||
const { initPool, renderHtml, POOL_SIZE } = require('./src/services/browserPool');
|
||||
const v2Routes = require('./src/versiontwo');
|
||||
const { cleanupExpiredSessions, cleanupExpiredSnapshots } = require('./src/database/db');
|
||||
const { notifyImageGenerated } = require('./src/services/discordWebhook');
|
||||
|
||||
const app = express();
|
||||
const PORT = 3000;
|
||||
@@ -220,7 +220,7 @@ function formatTimestamp(epoch) {
|
||||
return `${hour12}:${minutes} ${ampm} · ${month} ${day}, ${year}`;
|
||||
}
|
||||
|
||||
const TEMPLATE_PATH = path.join(__dirname, 'template.html');
|
||||
const TEMPLATE_PATH = path.join(__dirname, 'templates/template.html');
|
||||
const templateHtml = fs.readFileSync(TEMPLATE_PATH, 'utf8');
|
||||
|
||||
function buildEngagementHtml(engagement) {
|
||||
|
||||
Reference in New Issue
Block a user