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 1
1
import { Card } from "../src/card.ts" ;
2
2
import { CONSTANTS , parseParams } from "../src/utils.ts" ;
3
3
import { COLORS , Theme } from "../src/theme.ts" ;
4
- import { Error400 } from "../src/error_page.ts" ;
4
+ import { Error200 } from "../src/error_page.ts" ;
5
5
import "https://deno.land/x/dotenv@v0.5.0/load.ts" ;
6
6
import { staticRenderRegeneration } from "../src/StaticRenderRegeneration/index.ts" ;
7
7
import { GithubRepositoryService } from "../src/Repository/GithubRepository.ts" ;
@@ -63,7 +63,7 @@ async function app(req: Request): Promise<Response> {
63
63
64
64
if ( username === null ) {
65
65
const [ base ] = req . url . split ( "?" ) ;
66
- const error = new Error400 (
66
+ const error = new Error200 (
67
67
`<section>
68
68
<div>
69
69
<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 {
11
11
<html lang="en"><head>
12
12
<meta charset="UTF-8">
13
13
<meta name="viewport" content="width=device-width, initial-scale=1.0">
14
+ <meta name="google-adsense-account" content="ca-pub-7387527627218970">
14
15
<title>GitHub Profile Trophy</title>
15
16
<meta name="description" content="🏆 Add dynamically generated GitHub Stat Trophies on your readme">
16
17
<style>
@@ -101,9 +102,10 @@ abstract class BaseError {
101
102
}
102
103
}
103
104
</style>
105
+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7387527627218970" crossorigin="anonymous"></script>
104
106
</head>
105
107
<body>
106
- <h1 style="text-align: center;">${ this . status } - ${ this . message } </h1>
108
+ <h1 style="text-align: center;">${ this . message } </h1>
107
109
<p style="text-align: center;">${ this . content ?? "" } </p>
108
110
${
109
111
this . content &&
@@ -114,6 +116,11 @@ abstract class BaseError {
114
116
}
115
117
}
116
118
119
+ export class Error200 extends BaseError {
120
+ readonly status = 200 ;
121
+ readonly message = "" ;
122
+ }
123
+
117
124
export class Error400 extends BaseError {
118
125
readonly status = 400 ;
119
126
readonly message = "Bad Request" ;
You can’t perform that action at this time.
0 commit comments