From 08e0dcc81bd8d0feea26afab6044d18daaaaee6b Mon Sep 17 00:00:00 2001 From: ryo-ma Date: Mon, 28 Jul 2025 23:01:39 +0900 Subject: [PATCH 1/2] Add adsense check code --- api/index.ts | 4 ++-- src/error_page.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/api/index.ts b/api/index.ts index 0534237d..02295956 100644 --- a/api/index.ts +++ b/api/index.ts @@ -1,7 +1,7 @@ import { Card } from "../src/card.ts"; import { CONSTANTS, parseParams } from "../src/utils.ts"; import { COLORS, Theme } from "../src/theme.ts"; -import { Error400 } from "../src/error_page.ts"; +import { Error200 } from "../src/error_page.ts"; import "https://deno.land/x/dotenv@v0.5.0/load.ts"; import { staticRenderRegeneration } from "../src/StaticRenderRegeneration/index.ts"; import { GithubRepositoryService } from "../src/Repository/GithubRepository.ts"; @@ -63,7 +63,7 @@ async function app(req: Request): Promise { if (username === null) { const [base] = req.url.split("?"); - const error = new Error400( + const error = new Error200( `

"username" is a required query parameter

diff --git a/src/error_page.ts b/src/error_page.ts index 7b1acb9d..b6374075 100644 --- a/src/error_page.ts +++ b/src/error_page.ts @@ -11,6 +11,7 @@ abstract class BaseError { + GitHub Profile Trophy + -

${this.status} - ${this.message}

+

${this.message}

${this.content ?? ""}

${ this.content && @@ -114,6 +116,11 @@ abstract class BaseError { } } +export class Error200 extends BaseError { + readonly status = 200; + readonly message = ""; +} + export class Error400 extends BaseError { readonly status = 400; readonly message = "Bad Request"; From 102f9aa6211d68dab51cd4c6c22813f737f0f2ec Mon Sep 17 00:00:00 2001 From: Xhuljoo21 Date: Fri, 8 Aug 2025 14:49:23 +0200 Subject: [PATCH 2/2] Fix async attribute error in script tag --- src/error_page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error_page.ts b/src/error_page.ts index b6374075..87cd3531 100644 --- a/src/error_page.ts +++ b/src/error_page.ts @@ -102,7 +102,7 @@ abstract class BaseError { } } - +

${this.message}