@@ -46,6 +74,7 @@ export default function UserBuildsPage() {
{data.builds.map((build) => (
{
schema: newBuildActionSchema,
});
+ const usersBuilds = db.builds.buildsByUserId(user.id);
+ if (usersBuilds.length >= BUILD.MAX_COUNT) {
+ throw new Response(null, { status: 400 });
+ }
+
db.builds.create({
title: data.title,
description: data.description,
diff --git a/public/locales/en/builds.json b/public/locales/en/builds.json
index 2922142b1..a8d9a1b2d 100644
--- a/public/locales/en/builds.json
+++ b/public/locales/en/builds.json
@@ -9,5 +9,7 @@
"forms.weapons": "Weapons",
"forms.gear.HEAD": "Gear (head)",
"forms.gear.CLOTHES": "Gear (clothes)",
- "forms.gear.SHOES": "Gear (shoes)"
+ "forms.gear.SHOES": "Gear (shoes)",
+
+ "deleteConfirm": "Delete build '{{title}}'?"
}
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index dd4fcd788..6db053eaa 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -23,6 +23,7 @@
"actions.edit": "Edit",
"actions.add": "Add",
"actions.remove": "Remove",
+ "actions.delete": "Delete",
"results": "Results",