listpage-next-nest 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -401,7 +401,7 @@ function StaticRouteMiddlewareFactory(options) {
|
|
|
401
401
|
return function(req, res, next) {
|
|
402
402
|
const { rootDir, routeMappings } = options;
|
|
403
403
|
if (external_path_namespaceObject.extname(req.path)) {
|
|
404
|
-
const filePath = external_path_namespaceObject.join(
|
|
404
|
+
const filePath = external_path_namespaceObject.join(rootDir, req.path);
|
|
405
405
|
if (!(0, external_fs_namespaceObject.existsSync)(filePath)) next(new common_namespaceObject.NotFoundException(`File not found: ${req.path}`));
|
|
406
406
|
res.sendFile(filePath, (err)=>{
|
|
407
407
|
if (err) next(err);
|