add return statements to history api
This commit is contained in:
parent
812c70e0da
commit
3ebb954c59
|
@ -14,6 +14,7 @@ async function history(req: Request, res: Response) {
|
||||||
|| day.includes('/') || day.includes('\\') || day.length !== 8
|
|| day.includes('/') || day.includes('\\') || day.length !== 8
|
||||||
) {
|
) {
|
||||||
res.status(404).end();
|
res.status(404).end();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
const yyyy = day.slice(0, 4);
|
const yyyy = day.slice(0, 4);
|
||||||
const mm = day.slice(4, 6);
|
const mm = day.slice(4, 6);
|
||||||
|
@ -23,6 +24,7 @@ async function history(req: Request, res: Response) {
|
||||||
try {
|
try {
|
||||||
if (!fs.existsSync(path)) {
|
if (!fs.existsSync(path)) {
|
||||||
res.status(404).end();
|
res.status(404).end();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dirs = fs.readdirSync(path);
|
const dirs = fs.readdirSync(path);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user