Add audit log to project spec tests

This commit is contained in:
Nick O'Leary
2019-08-09 17:09:03 +01:00
parent be2dd6dc32
commit 16440072fb
2 changed files with 91 additions and 31 deletions

View File

@@ -62,7 +62,7 @@ var api = module.exports = {
* @memberof @node-red/runtime_projects
*/
createProject: function(opts) {
runtime.log.audit({event: "projects.create",name:opts.project.name}, opts.req);
runtime.log.audit({event: "projects.create",name:opts.project?opts.project.name:"missing-name"}, opts.req);
return runtime.storage.projects.createProject(opts.user, opts.project)
},