mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-19 14:09:06 +03:00
Use join function for simplicity
This commit is contained in:
@@ -23,7 +23,7 @@ export async function postClearCache(req: Request, res: Response): Promise<Respo
|
||||
|
||||
if (invalidFields.length !== 0) {
|
||||
// invalid request
|
||||
const fields = invalidFields.reduce((p, c, i) => p + (i !== 0 ? ", " : "") + c, "");
|
||||
const fields = invalidFields.join(", ");
|
||||
return res.status(400).send(`No valid ${fields} field(s) provided`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user