update deps (#14594)

* wip

* Update ClientServerService.ts

* eslint

* Update fetch-resource.ts

* wip
This commit is contained in:
syuilo
2024-09-22 12:32:01 +09:00
committed by GitHub
parent 9ac4d3da0a
commit 76408667f3
13 changed files with 3223 additions and 4414 deletions

View File

@@ -82,7 +82,7 @@ export class FileServerService {
.catch(err => this.errorHandler(request, reply, err));
});
fastify.get<{ Params: { key: string; } }>('/files/:key/*', async (request, reply) => {
return await reply.redirect(301, `${this.config.url}/files/${request.params.key}`);
return await reply.redirect(`${this.config.url}/files/${request.params.key}`, 301);
});
done();
});
@@ -147,12 +147,12 @@ export class FileServerService {
url.searchParams.set('static', '1');
file.cleanup();
return await reply.redirect(301, url.toString());
return await reply.redirect(url.toString(), 301);
} else if (file.mime.startsWith('video/')) {
const externalThumbnail = this.videoProcessingService.getExternalVideoThumbnailUrl(file.url);
if (externalThumbnail) {
file.cleanup();
return await reply.redirect(301, externalThumbnail);
return await reply.redirect(externalThumbnail, 301);
}
image = await this.videoProcessingService.generateVideoThumbnail(file.path);
@@ -167,7 +167,7 @@ export class FileServerService {
url.searchParams.set('url', file.url);
file.cleanup();
return await reply.redirect(301, url.toString());
return await reply.redirect(url.toString(), 301);
}
}
@@ -314,8 +314,8 @@ export class FileServerService {
}
return await reply.redirect(
301,
url.toString(),
301,
);
}