strapi-cdn-url-rewrite
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -22,3 +22,3 @@ const flatten = require('flat') | ||
cdn = data => { | ||
cdnRewrite = data => { | ||
try { | ||
@@ -25,0 +25,0 @@ if (data && data.constructor === Object) { |
{ | ||
"name": "strapi-cdn-url-rewrite", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Strapi controller module to rewrite upload URLs to CDN", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -30,10 +30,10 @@ # Welcome to strapi-cdn-url-rewrite 👋 | ||
const { cdn } = new StrapiCdnUrlRewrite() | ||
const { cdnRewrite } = new StrapiCdnUrlRewrite() | ||
module.exports = { | ||
async find(ctx) { | ||
return cdn(await strapi.services.{COLLECTION}.find()) | ||
return cdnRewrite(await strapi.services.{COLLECTION}.find()) | ||
}, | ||
async findOne(ctx) { | ||
return cdn(await strapi.services.{COLLECTION}.findOne()) | ||
return cdnRewrite(await strapi.services.{COLLECTION}.findOne()) | ||
} | ||
@@ -46,3 +46,3 @@ } | ||
```javascript | ||
const { cdn } = StrapiCdnUrlRewrite(storageUrl, cdnUrl) | ||
const { cdnRewrite } = StrapiCdnUrlRewrite(storageUrl, cdnUrl) | ||
``` | ||
@@ -49,0 +49,0 @@ |
5994