generated from nhcarrigan/template
feat: another security sweep
This commit is contained in:
@@ -136,6 +136,11 @@ const likesRoutes: FastifyPluginAsync = async (app) => {
|
||||
return { error: "Items array is required" };
|
||||
}
|
||||
|
||||
if (items.length > 100) {
|
||||
reply.code(400);
|
||||
return { error: "Maximum 100 items allowed per request" };
|
||||
}
|
||||
|
||||
const validTypes = ['book', 'game', 'show', 'manga', 'music', 'art'];
|
||||
const results = await Promise.all(
|
||||
items.map(async (item) => {
|
||||
|
||||
Reference in New Issue
Block a user