Skip to content

Commit 5dbdb71

Browse files
chore: lint
1 parent 0992821 commit 5dbdb71

3 files changed

Lines changed: 13 additions & 14 deletions

File tree

src/config/index.js

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22

33
const { pluginConfigSchema } = require('./schema');
44

5-
const config = {
6-
default: ({ env }) => ({
7-
cacheDir: env('STRAPI_PLUGIN_LOCAL_IMAGE_SHARP_CACHE_DIR', ''),
8-
maxAge: 3600,
9-
paths: ['/uploads']
10-
}),
11-
validator(config) {
12-
pluginConfigSchema.validateSync(config);
13-
},
14-
};
15-
165
module.exports = {
17-
config
6+
config: {
7+
default: ({ env }) => ({
8+
cacheDir: env('STRAPI_PLUGIN_LOCAL_IMAGE_SHARP_CACHE_DIR', ''),
9+
maxAge: 3600,
10+
paths: ['/uploads']
11+
}),
12+
validator(config) {
13+
pluginConfigSchema.validateSync(config);
14+
},
15+
}
1816
};

src/middleware.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function createMiddleware(ipx) {
2323
const statusCode = 500;
2424
const statusMessage = 'No path found';
2525
strapi.log.debug(statusMessage);
26-
return ctx.status = statusCode;
26+
ctx.status = statusCode
27+
return;
2728
}
2829

2930
const [url, query] = path.split('?');

src/register.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function register({ strapi }) {
4242
dir: config.srcDir + path,
4343
})
4444

45-
router.get(path + '/(.*)', createMiddleware(ipx))
45+
router.get(`${path}/(.*)`, createMiddleware(ipx))
4646
})
4747

4848
strapi.server.use(router.routes())

0 commit comments

Comments
 (0)