From eb30afcb83ff1d5403f93812e28eceaeba4b0781 Mon Sep 17 00:00:00 2001
From: dicedtomato <35403473+diced@users.noreply.github.com>
Date: Wed, 13 Jul 2022 16:32:18 +0000
Subject: [PATCH] remove: meta config (will be added another day)
---
.env.local.example | 6 +-----
src/lib/config/Config.ts | 8 --------
src/lib/config/readConfig.ts | 4 ----
src/lib/config/validateConfig.ts | 5 -----
src/pages/404.tsx | 4 +++-
src/pages/500.tsx | 4 +++-
src/pages/[...id].tsx | 3 ++-
src/pages/_error.tsx | 4 +++-
8 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/.env.local.example b/.env.local.example
index 08cf8f2..518e1e8 100644
--- a/.env.local.example
+++ b/.env.local.example
@@ -43,8 +43,4 @@ URLS_ROUTE=/go
URLS_LENGTH=6
RATELIMIT_USER = 5
-RATELIMIT_ADMIN = 3
-
-META_DESCRIPTION="zipline cool"
-META_KEYWORDS="zipline,cool,image,uploads,sharing"
-META_THEME_COLOR="#000000"
\ No newline at end of file
+RATELIMIT_ADMIN = 3
\ No newline at end of file
diff --git a/src/lib/config/Config.ts b/src/lib/config/Config.ts
index 5ed4137..8c9fcb6 100644
--- a/src/lib/config/Config.ts
+++ b/src/lib/config/Config.ts
@@ -105,18 +105,10 @@ export interface ConfigRatelimit {
admin: number;
}
-// Metadata for the site
-export interface ConfigMeta {
- description: string;
- theme_color: string;
- keywords: string;
-}
-
export interface Config {
core: ConfigCore;
uploader: ConfigUploader;
urls: ConfigUrls;
ratelimit: ConfigRatelimit;
datasource: ConfigDatasource;
- meta: ConfigMeta;
}
\ No newline at end of file
diff --git a/src/lib/config/readConfig.ts b/src/lib/config/readConfig.ts
index e6a6919..a297227 100644
--- a/src/lib/config/readConfig.ts
+++ b/src/lib/config/readConfig.ts
@@ -80,10 +80,6 @@ export default function readConfig() {
map('RATELIMIT_USER', 'number', 'ratelimit.user'),
map('RATELIMIT_ADMIN', 'number', 'ratelimit.admin'),
-
- map('META_DESCRITPION', 'string', 'meta.description'),
- map('META_KEYWORDS', 'string', 'meta.keywords'),
- map('META_THEME_COLOR', 'string', 'meta.theme_color'),
];
const config = {};
diff --git a/src/lib/config/validateConfig.ts b/src/lib/config/validateConfig.ts
index f34cc7d..98c1279 100644
--- a/src/lib/config/validateConfig.ts
+++ b/src/lib/config/validateConfig.ts
@@ -50,11 +50,6 @@ const validator = object({
user: number().default(0),
admin: number().default(0),
}),
- meta: object({
- description: string().nullable().notRequired(),
- theme_color: string().nullable().notRequired(),
- keywords: string().nullable().notRequired(),
- }).notRequired(),
});
export default function validate(config): Config {
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index 991f732..6057418 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -20,4 +20,6 @@ export default function FourOhFour() {
);
-}
\ No newline at end of file
+}
+
+FourOhFour.title = 'Zipline - 404';
\ No newline at end of file
diff --git a/src/pages/500.tsx b/src/pages/500.tsx
index fde6b67..e8f59f5 100644
--- a/src/pages/500.tsx
+++ b/src/pages/500.tsx
@@ -20,4 +20,6 @@ export default function FiveHundred() {
);
-}
\ No newline at end of file
+}
+
+FiveHundred.title = 'Zipline - 500';
\ No newline at end of file
diff --git a/src/pages/[...id].tsx b/src/pages/[...id].tsx
index ba5308a..bb1b3c5 100644
--- a/src/pages/[...id].tsx
+++ b/src/pages/[...id].tsx
@@ -213,4 +213,5 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
} else {
return { notFound: true };
}
-};
\ No newline at end of file
+};
+
diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx
index f46faed..ea546b2 100644
--- a/src/pages/_error.tsx
+++ b/src/pages/_error.tsx
@@ -25,4 +25,6 @@ export default function Error({ statusCode }) {
export function getInitialProps({ res, err }) {
const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
return { pageProps: { statusCode } };
-}
\ No newline at end of file
+}
+
+Error.title = 'Zipline - Something went wrong...';
\ No newline at end of file