File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11import { Card } from "../src/card.ts" ;
22import { CONSTANTS , parseParams } from "../src/utils.ts" ;
33import { COLORS , Theme } from "../src/theme.ts" ;
4- import { Error400 } from "../src/error_page.ts" ;
4+ import { Error200 } from "../src/error_page.ts" ;
55import "https://deno.land/x/dotenv@v0.5.0/load.ts" ;
66import { staticRenderRegeneration } from "../src/StaticRenderRegeneration/index.ts" ;
77import { GithubRepositoryService } from "../src/Repository/GithubRepository.ts" ;
@@ -63,7 +63,7 @@ async function app(req: Request): Promise<Response> {
6363
6464 if ( username === null ) {
6565 const [ base ] = req . url . split ( "?" ) ;
66- const error = new Error400 (
66+ const error = new Error200 (
6767 `<section>
6868 <div>
6969 <h2>"username" is a required query parameter</h2>
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ abstract class BaseError {
1111 <html lang="en"><head>
1212 <meta charset="UTF-8">
1313 <meta name="viewport" content="width=device-width, initial-scale=1.0">
14+ <meta name="google-adsense-account" content="ca-pub-7387527627218970">
1415 <title>GitHub Profile Trophy</title>
1516 <meta name="description" content="🏆 Add dynamically generated GitHub Stat Trophies on your readme">
1617 <style>
@@ -101,9 +102,10 @@ abstract class BaseError {
101102 }
102103 }
103104 </style>
105+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7387527627218970" crossorigin="anonymous"></script>
104106 </head>
105107 <body>
106- <h1 style="text-align: center;">${ this . status } - ${ this . message } </h1>
108+ <h1 style="text-align: center;">${ this . message } </h1>
107109 <p style="text-align: center;">${ this . content ?? "" } </p>
108110 ${
109111 this . content &&
@@ -114,6 +116,11 @@ abstract class BaseError {
114116 }
115117}
116118
119+ export class Error200 extends BaseError {
120+ readonly status = 200 ;
121+ readonly message = "" ;
122+ }
123+
117124export class Error400 extends BaseError {
118125 readonly status = 400 ;
119126 readonly message = "Bad Request" ;
You can’t perform that action at this time.
0 commit comments