mirror of
https://github.com/Cameri/nostream.git
synced 2025-03-17 21:31:48 +01:00
chore: relax filter limits
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
parent
88e1d61936
commit
50de2c167a
@ -9,4 +9,4 @@ export const filterSchema = Schema.object({
|
||||
since: Schema.number().min(0).multiple(1),
|
||||
until: Schema.number().min(0).multiple(1),
|
||||
limit: Schema.number().min(1).multiple(1).max(10000),
|
||||
}).pattern(/^#[a-z]$/, Schema.array().items(Schema.string().max(1024)).max(100))
|
||||
}).pattern(/^#[a-z]$/, Schema.array().items(Schema.string().max(1024)).max(256))
|
||||
|
@ -32,7 +32,7 @@ describe('NIP-01', () => {
|
||||
const cases = {
|
||||
ids: [
|
||||
{ message: 'must be an array', transform: assocPath(['ids'], null) },
|
||||
{ message: 'must contain less than or equal to 256 items', transform: assocPath(['ids'], range(0, 257).map(() => 'f')) },
|
||||
{ message: 'must contain less than or equal to 1000 items', transform: assocPath(['ids'], range(0, 1001).map(() => 'f')) },
|
||||
],
|
||||
prefixOrId: [
|
||||
{ message: 'length must be less than or equal to 64 characters long', transform: assocPath(['ids', 0], 'f'.repeat(65)) },
|
||||
@ -41,7 +41,7 @@ describe('NIP-01', () => {
|
||||
],
|
||||
authors: [
|
||||
{ message: 'must be an array', transform: assocPath(['authors'], null) },
|
||||
{ message: 'must contain less than or equal to 256 items', transform: assocPath(['authors'], range(0, 257).map(() => 'f')) },
|
||||
{ message: 'must contain less than or equal to 1000 items', transform: assocPath(['authors'], range(0, 1001).map(() => 'f')) },
|
||||
],
|
||||
prefixOrAuthor: [
|
||||
{ message: 'length must be less than or equal to 64 characters long', transform: assocPath(['authors', 0], 'f'.repeat(65)) },
|
||||
|
Loading…
x
Reference in New Issue
Block a user