mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-22 06:57:41 +01:00
Unasync route handler
This commit is contained in:
parent
53514b5e1a
commit
7fbff41329
@ -14,7 +14,7 @@ export default function getWebpackServeMiddleware() {
|
|||||||
* @param {import('express').NextFunction} next Next function.
|
* @param {import('express').NextFunction} next Next function.
|
||||||
* @type {import('express').RequestHandler}
|
* @type {import('express').RequestHandler}
|
||||||
*/
|
*/
|
||||||
async function devMiddleware(req, res, next) {
|
function devMiddleware(req, res, next) {
|
||||||
if (req.method === 'GET' && path.parse(req.path).base === outputFile) {
|
if (req.method === 'GET' && path.parse(req.path).base === outputFile) {
|
||||||
return res.sendFile(outputFile, { root: outputPath });
|
return res.sendFile(outputFile, { root: outputPath });
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user