From e54c9ac3dd96c3430d0a23eccd8bc297e98b2535 Mon Sep 17 00:00:00 2001 From: Maksym Mykhailenko Date: Wed, 18 Dec 2019 11:48:51 +0800 Subject: [PATCH] fix: create attachments --- src/services/ProcessorServiceAttachment.js | 2 +- test/data/attachment/project.action.create.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/ProcessorServiceAttachment.js b/src/services/ProcessorServiceAttachment.js index a014260..6b27c6b 100644 --- a/src/services/ProcessorServiceAttachment.js +++ b/src/services/ProcessorServiceAttachment.js @@ -40,7 +40,7 @@ function createSchema () { category: Joi.string().optional().allow(null).allow(''), size: Joi.number().optional().allow(null), contentType: Joi.string().required(), - downloadUrl: Joi.string().required() + filePath: Joi.string().required() }) } diff --git a/test/data/attachment/project.action.create.json b/test/data/attachment/project.action.create.json index 5901ca5..617ad00 100644 --- a/test/data/attachment/project.action.create.json +++ b/test/data/attachment/project.action.create.json @@ -1 +1 @@ -{"topic":"project.action.create","originator":"project-api","timestamp":"2019-06-21T04:41:17.702Z","mime-type":"application/json","payload":{"resource":"attachment","createdAt":"2019-06-21T04:41:17.637Z","updatedAt":"2019-06-21T04:41:17.637Z","id":1,"projectId":1,"allowedUsers":null,"createdBy":40051333,"updatedBy":40051333,"title":"first attachment submission","size":null,"category":null,"description":null,"contentType":"application/png","deletedBy":null,"downloadUrl":"projects/1/projects/asdasd.png"}} \ No newline at end of file +{"topic":"project.action.create","originator":"project-api","timestamp":"2019-06-21T04:41:17.702Z","mime-type":"application/json","payload":{"resource":"attachment","createdAt":"2019-06-21T04:41:17.637Z","updatedAt":"2019-06-21T04:41:17.637Z","id":1,"projectId":1,"allowedUsers":null,"createdBy":40051333,"updatedBy":40051333,"title":"first attachment submission","size":null,"category":null,"description":null,"contentType":"application/png","deletedBy":null,"filePath":"projects/1/projects/asdasd.png"}} \ No newline at end of file