fix thumbnail with no method
parent
6fdd0c2831
commit
fc6236e3ac
|
@ -124,12 +124,14 @@ media.get('/thumbnail/:serverName/:mediaId', async (ctx) => {
|
|||
if (
|
||||
typeof ctx.query.width !== 'string' ||
|
||||
typeof ctx.query.height !== 'string' ||
|
||||
typeof ctx.query.method !== 'string'
|
||||
(typeof ctx.query.method !== 'string' && typeof ctx.query.method !== 'undefined')
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const { method } = ctx.query;
|
||||
assert(['crop', 'scale'].includes(method));
|
||||
if (method) {
|
||||
assert(['crop', 'scale'].includes(method));
|
||||
}
|
||||
const width = parseInt(ctx.query.width, 10);
|
||||
const height = parseInt(ctx.query.height, 10);
|
||||
|
||||
|
|
Loading…
Reference in New Issue