Archived
2

adapted changelog

This commit is contained in:
VLE2FE
2020-08-28 16:50:33 +02:00
parent c891933d11
commit 156b65d033
5 changed files with 53 additions and 40 deletions

View File

@ -28,7 +28,7 @@ export default class RootValidate { // validate input for root methods
static changelogParams (data) {
return Joi.object({
timestamp: this.changelog.timestamp.required(),
id: IdValidate.get(),
page: this.changelog.page,
pagesize: this.changelog.pagesize
}).validate(data);
@ -39,6 +39,7 @@ export default class RootValidate { // validate input for root methods
data.collection = data.collection_name;
data = IdValidate.stringify(data);
const {value, error} = Joi.object({
_id: IdValidate.get(),
date: this.changelog.timestamp,
action: this.changelog.action,
collection: this.changelog.collection,