1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 17:46:39 -04:00

use lit-html instead of unsafe innerHTML on /projects

This commit is contained in:
2021-07-28 11:13:32 -04:00
parent ac3fb5ae95
commit 574ea65d8d
6 changed files with 300 additions and 93 deletions

View File

@ -1,7 +1,6 @@
import * as Sentry from "@sentry/node";
import { VercelRequest, VercelResponse } from "@vercel/node";
import { graphql, GraphQlQueryResponseData } from "@octokit/graphql";
import { encode } from "html-entities";
import type { Repository, GHRepoSchema } from "./types/projects";
@ -95,7 +94,7 @@ const fetchRepos = async (sort: string): Promise<Repository[]> => {
({ node: repo }: { [key: string]: Readonly<GHRepoSchema> }) => ({
name: repo.name,
url: repo.url,
description: encode(repo.description),
description: repo.description,
updatedAt: new Date(repo.pushedAt),
stars: repo.stargazerCount,
forks: repo.forkCount,