diff --git a/express.js b/express.js index 912f2a0f47..75d5d60289 100644 --- a/express.js +++ b/express.js @@ -26,9 +26,7 @@ app.get(`${process.env.DIR || ''}/api/provider/:provider?`, api) app.post(`${process.env.DIR || ''}/api/provider/:provider?`, express.json({ limit: '5mb' }), api) -app.get(`${process.env.DIR || ''}/api/sign/:provider?`, api) - -app.post(`${process.env.DIR || ''}/api/sign/:provider?`, express.json({ limit: '5mb' }), api) +app.get(`${process.env.DIR || ''}/api/sign/:signer?`, api) app.get(`${process.env.DIR || ''}/api/query/:template?`, api) diff --git a/lib/ui/locations/entries/cloudinary.mjs b/lib/ui/locations/entries/cloudinary.mjs index 578f869802..07031bb326 100644 --- a/lib/ui/locations/entries/cloudinary.mjs +++ b/lib/ui/locations/entries/cloudinary.mjs @@ -1,20 +1,22 @@ -const types = { - image, - images, - documents -} +/** +## /ui/locations/entries/cloudinary -const onload = { - image: imageLoad, - images: imageLoad, - documents: docLoad -} +The cloudinary module exports a method to upload or destroy resources with signed requests on cloudinary. + +The exported method creates an interface in the location view with input for images and documents. + +@requires /utils/xhr +@requires /utils/imagePreview + +@module /ui/locations/entries/cloudinary +*/ mapp.utils.merge(mapp.dictionaries, { en: { image_upload_failed: 'Image upload failed.', document_upload_failed: 'Document upload failed.', - remove_item_confirm: 'Remove item?' + remove_image_confirm: 'Are you sure to remove the image? This cannot be undone.', + remove_document_confirm: 'Are you sure to remove this document? This cannot be undone.' }, de: { image_upload_failed: 'Hochladen des Bildes gescheitert.', @@ -58,112 +60,141 @@ mapp.utils.merge(mapp.dictionaries, { } }) +const types = { + image, + images, + documents +} + export default entry => types[entry.type](entry) -function image(entry) { +/** +@function image - if (entry.value) { +@description +The image entry.type function returns an image with a button to detroy the image the entry has a value and is editable. - const trashBtn = mapp.utils.html` -