mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-12 03:05:12 +00:00
remove unused get_asset_handler
This commit is contained in:
@@ -109,21 +109,6 @@ function serve({ prefix, pathname, cache_control }: {
|
||||
};
|
||||
}
|
||||
|
||||
function get_asset_handler({ pathname, type, cache, body }: {
|
||||
pathname: string;
|
||||
type: string;
|
||||
cache: string;
|
||||
body: string;
|
||||
}) {
|
||||
return (req: Req, res: ServerResponse, next: () => void) => {
|
||||
if (req.pathname !== pathname) return next();
|
||||
|
||||
res.setHeader('Content-Type', type);
|
||||
res.setHeader('Cache-Control', cache);
|
||||
res.end(body);
|
||||
};
|
||||
}
|
||||
|
||||
const resolved = Promise.resolve();
|
||||
|
||||
function get_route_handler(chunks: Record<string, string>, routes: RouteObject[]) {
|
||||
|
||||
Reference in New Issue
Block a user