mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-11 09:39:40 +00:00
Added next play time to html page
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { nextPlayBackTime } from './../bot';
|
||||
import express from 'express';
|
||||
import multer, { diskStorage } from 'multer';
|
||||
import path from 'path';
|
||||
@@ -11,6 +12,7 @@ const storage = diskStorage({
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const upload = multer({
|
||||
storage: storage,
|
||||
limits: { fileSize: 1 * 1024 * 1024 },
|
||||
@@ -41,6 +43,10 @@ app.get('/sounds', (_req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/nextplaybacktime', (_req, res) => {
|
||||
res.send(nextPlayBackTime);
|
||||
});
|
||||
|
||||
app.delete('/sounds/:filename', (req, res) => {
|
||||
const fs = require('fs');
|
||||
const directoryPath = path.join(__dirname, '../sounds');
|
||||
|
||||
Reference in New Issue
Block a user