fix(xo-server/api): throw on unexpected parameters
This commit is contained in:
@@ -183,6 +183,7 @@ getLogs.params = {
|
||||
after: { type: ['number', 'string'], optional: true },
|
||||
before: { type: ['number', 'string'], optional: true },
|
||||
limit: { type: 'number', optional: true },
|
||||
'*': { type: 'any' },
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -60,8 +60,9 @@ function checkParams(method, params) {
|
||||
|
||||
const result = schemaInspector.validate(
|
||||
{
|
||||
type: 'object',
|
||||
properties: schema,
|
||||
strict: true,
|
||||
type: 'object',
|
||||
},
|
||||
params
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user