1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-11-29 23:38:13 +09:00
This commit is contained in:
syuilo 2018-05-04 16:48:18 +09:00
parent e7dd74a443
commit cf3112c7c0
3 changed files with 6 additions and 1 deletions

View File

@ -30,6 +30,7 @@ export type IMetadata = {
comment: string;
uri: string;
deletedAt?: Date;
isExpired?: boolean;
};
export type IDriveFile = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -31,7 +31,11 @@ export default async function(ctx: Koa.Context) {
if (file.metadata.deletedAt) {
ctx.status = 410;
if (file.metadata.isExpired) {
await send(ctx, `${__dirname}/assets/cache-expired.png`);
} else {
await send(ctx, `${__dirname}/assets/tombstone.png`);
}
return;
}