cloudflare: clean up exports, correct status code

This commit is contained in:
Brandon Liu
2022-10-19 19:36:06 +08:00
parent 550c62e73e
commit da235cac22

View File

@@ -12,7 +12,7 @@ import {
TileType,
} from "../../../js";
export interface Env {
interface Env {
BUCKET: R2Bucket;
PMTILES_PATH?: string;
}
@@ -36,7 +36,7 @@ export const pmtiles_path = (p: string | undefined, name: string): string => {
const CACHE = new ResolvedValueCache();
export class R2Source implements Source {
class R2Source implements Source {
env: Env;
archive_name: string;
@@ -135,6 +135,6 @@ export default {
}
// TODO: metadata responses
return new Response("Invalid URL", { status: 400 });
return new Response("Invalid URL", { status: 404 });
},
};