Enable E-Tags for GUI and RAW
This commit is contained in:
		@ -33,16 +33,13 @@ function Package({ pkg }: { pkg: IPackage }) {
 | 
			
		||||
 | 
			
		||||
import { Main, Menu } from "./_default.tsx";
 | 
			
		||||
 | 
			
		||||
export default async function index({ search }: any) {
 | 
			
		||||
   let packages: IPackage[] = [];
 | 
			
		||||
   if (search && search !== "") {
 | 
			
		||||
      packages = await DB.package.find({
 | 
			
		||||
         name: RegExp(`${search}`),
 | 
			
		||||
      });
 | 
			
		||||
   } else {
 | 
			
		||||
      packages = await DB.package.find({});
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
export default async function index({
 | 
			
		||||
   packages,
 | 
			
		||||
   search,
 | 
			
		||||
}: {
 | 
			
		||||
   packages: IPackage[];
 | 
			
		||||
   search: string;
 | 
			
		||||
}) {
 | 
			
		||||
   return (
 | 
			
		||||
      <Base>
 | 
			
		||||
         <Main>
 | 
			
		||||
 | 
			
		||||
@ -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