mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-01 23:55:58 +09:00
✌️
This commit is contained in:
parent
e7dd74a443
commit
cf3112c7c0
@ -30,6 +30,7 @@ export type IMetadata = {
|
|||||||
comment: string;
|
comment: string;
|
||||||
uri: string;
|
uri: string;
|
||||||
deletedAt?: Date;
|
deletedAt?: Date;
|
||||||
|
isExpired?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IDriveFile = {
|
export type IDriveFile = {
|
||||||
|
BIN
src/server/file/assets/cache-expired.png
Normal file
BIN
src/server/file/assets/cache-expired.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -31,7 +31,11 @@ export default async function(ctx: Koa.Context) {
|
|||||||
|
|
||||||
if (file.metadata.deletedAt) {
|
if (file.metadata.deletedAt) {
|
||||||
ctx.status = 410;
|
ctx.status = 410;
|
||||||
await send(ctx, `${__dirname}/assets/tombstone.png`);
|
if (file.metadata.isExpired) {
|
||||||
|
await send(ctx, `${__dirname}/assets/cache-expired.png`);
|
||||||
|
} else {
|
||||||
|
await send(ctx, `${__dirname}/assets/tombstone.png`);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user