mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-31 01:16:01 +02:00
fix: projectId must follow nameType in query
This commit is contained in:
parent
9e649118e5
commit
40bde7c08b
@ -100,7 +100,7 @@ const querySchema = joi
|
||||
project: joi
|
||||
.array()
|
||||
.allow(null)
|
||||
.items(joi.string().alphanum())
|
||||
.items(nameType)
|
||||
.optional(),
|
||||
namePrefix: joi
|
||||
.string()
|
||||
|
@ -262,8 +262,5 @@ test('Filter queries should reject project names that are not alphanum', t => {
|
||||
project: ['project name with space'],
|
||||
};
|
||||
const { error } = querySchema.validate(query);
|
||||
t.deepEqual(
|
||||
error.details[0].message,
|
||||
'"project[0]" must only contain alpha-numeric characters',
|
||||
);
|
||||
t.deepEqual(error.details[0].message, '"project[0]" must be URL friendly');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user