[api] up invention limit to match client

This commit is contained in:
Devin Zuczek
2026-10-20 12:52:28 -04:00
parent 38bb9cff73
commit 71b0215ed3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -3584,9 +3584,9 @@ describe('public endpoints', () => {
body: JSON.stringify({ inventionDataFilename: 'a.inv', ...fields }), body: JSON.stringify({ inventionDataFilename: 'a.inv', ...fields }),
}) })
// A name is 3–24 characters of letters, digits, spaces, dashes and colons. // A name is 3–40 characters of letters, digits, spaces, dashes and colons.
expect((await save({ name: 'ab' })).status).toBe(400) expect((await save({ name: 'ab' })).status).toBe(400)
expect((await save({ name: 'a'.repeat(25) })).status).toBe(400) expect((await save({ name: 'a'.repeat(41) })).status).toBe(400)
expect((await save({ name: 'Rocket!' })).status).toBe(400) expect((await save({ name: 'Rocket!' })).status).toBe(400)
expect((await save({ name: 'Café Lamp' })).status).toBe(400) expect((await save({ name: 'Café Lamp' })).status).toBe(400)
const ok = await save({ name: 'Rocket Sofa-Bed 2' }) const ok = await save({ name: 'Rocket Sofa-Bed 2' })
+1 -1
View File
@@ -58,7 +58,7 @@ export const MAX_EVENT_DURATION_MS = 24 * 60 * 60 * 1000
* offers `Untitled` rather than an empty box. * offers `Untitled` rather than an empty box.
*/ */
export const MIN_INVENTION_NAME_LENGTH = 3 export const MIN_INVENTION_NAME_LENGTH = 3
export const MAX_INVENTION_NAME_LENGTH = 24 export const MAX_INVENTION_NAME_LENGTH = 40
export const MAX_INVENTION_DESCRIPTION_LENGTH = 512 export const MAX_INVENTION_DESCRIPTION_LENGTH = 512
/** /**