mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
✌️
This commit is contained in:
parent
456fe73203
commit
e45cc0f5f8
3 changed files with 9 additions and 1 deletions
|
@ -30,6 +30,7 @@ export type IMetadata = {
|
|||
comment: string;
|
||||
uri: string;
|
||||
deletedAt?: Date;
|
||||
isExpired?: boolean;
|
||||
};
|
||||
|
||||
export type IDriveFile = {
|
||||
|
|
BIN
src/server/file/assets/cache-expired.png
(Stored with Git LFS)
Normal file
BIN
src/server/file/assets/cache-expired.png
(Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue