Enable E-Tags for GUI and RAW
This commit is contained in:
@ -30,9 +30,7 @@ import { sortVersions, getFile } from "../utils.ts";
|
||||
|
||||
import { Main, Menu } from "./_default.tsx";
|
||||
|
||||
export default async function index({ packageName }: any) {
|
||||
const pkg = await DB.package.findOne({ name: packageName });
|
||||
|
||||
export default async function index({ pkg }: { pkg: IPackage }) {
|
||||
if (!pkg)
|
||||
return (
|
||||
<Base>
|
||||
@ -40,15 +38,14 @@ export default async function index({ packageName }: any) {
|
||||
</Base>
|
||||
);
|
||||
|
||||
const readmeContent = await getFile(
|
||||
packageName,
|
||||
undefined,
|
||||
"README.md"
|
||||
).then((res) => {
|
||||
if (res)
|
||||
return Marked.parse(new TextDecoder().decode(res)).content as string;
|
||||
else return undefined;
|
||||
});
|
||||
const readmeContent = await getFile(pkg.name, undefined, "README.md").then(
|
||||
(res) => {
|
||||
if (res)
|
||||
return Marked.parse(new TextDecoder().decode(res.data))
|
||||
.content as string;
|
||||
else return undefined;
|
||||
}
|
||||
);
|
||||
|
||||
return (
|
||||
<Base>
|
||||
|
Reference in New Issue
Block a user