1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-03 01:09:01 +09:00
This commit is contained in:
syuilo 2018-05-04 18:02:09 +09:00
parent 1311db8060
commit d69b919961

View File

@ -27,16 +27,16 @@ export default async function(ctx: Koa.Context) {
if (file == null) {
ctx.status = 404;
await send(ctx, `${__dirname}/assets/dummy.png`, { root: assets });
await send(ctx, '/dummy.png', { root: assets });
return;
}
if (file.metadata.deletedAt) {
ctx.status = 410;
if (file.metadata.isExpired) {
await send(ctx, `${__dirname}/assets/cache-expired.png`, { root: assets });
await send(ctx, '/cache-expired.png', { root: assets });
} else {
await send(ctx, `${__dirname}/assets/tombstone.png`, { root: assets });
await send(ctx, '/tombstone.png', { root: assets });
}
return;
}