1
0
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:
Ivar Conradi Østhus 2021-03-05 14:12:56 +01:00
parent 9e649118e5
commit 40bde7c08b
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09
2 changed files with 2 additions and 5 deletions

View File

@ -100,7 +100,7 @@ const querySchema = joi
project: joi
.array()
.allow(null)
.items(joi.string().alphanum())
.items(nameType)
.optional(),
namePrefix: joi
.string()

View File

@ -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');
});