remove: meta config (will be added another day)

This commit is contained in:
dicedtomato 2022-07-13 16:32:18 +00:00 committed by GitHub
parent cdf0f6e96c
commit eb30afcb83
8 changed files with 12 additions and 26 deletions

View file

@ -43,8 +43,4 @@ URLS_ROUTE=/go
URLS_LENGTH=6 URLS_LENGTH=6
RATELIMIT_USER = 5 RATELIMIT_USER = 5
RATELIMIT_ADMIN = 3 RATELIMIT_ADMIN = 3
META_DESCRIPTION="zipline cool"
META_KEYWORDS="zipline,cool,image,uploads,sharing"
META_THEME_COLOR="#000000"

View file

@ -105,18 +105,10 @@ export interface ConfigRatelimit {
admin: number; admin: number;
} }
// Metadata for the site
export interface ConfigMeta {
description: string;
theme_color: string;
keywords: string;
}
export interface Config { export interface Config {
core: ConfigCore; core: ConfigCore;
uploader: ConfigUploader; uploader: ConfigUploader;
urls: ConfigUrls; urls: ConfigUrls;
ratelimit: ConfigRatelimit; ratelimit: ConfigRatelimit;
datasource: ConfigDatasource; datasource: ConfigDatasource;
meta: ConfigMeta;
} }

View file

@ -80,10 +80,6 @@ export default function readConfig() {
map('RATELIMIT_USER', 'number', 'ratelimit.user'), map('RATELIMIT_USER', 'number', 'ratelimit.user'),
map('RATELIMIT_ADMIN', 'number', 'ratelimit.admin'), 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 = {}; const config = {};

View file

@ -50,11 +50,6 @@ const validator = object({
user: number().default(0), user: number().default(0),
admin: 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 { export default function validate(config): Config {

View file

@ -20,4 +20,6 @@ export default function FourOhFour() {
<Button component={Link} href='/dashboard'>Head to the Dashboard</Button> <Button component={Link} href='/dashboard'>Head to the Dashboard</Button>
</Stack> </Stack>
); );
} }
FourOhFour.title = 'Zipline - 404';

View file

@ -20,4 +20,6 @@ export default function FiveHundred() {
<Button component={Link} href='/dashboard'>Head to the Dashboard</Button> <Button component={Link} href='/dashboard'>Head to the Dashboard</Button>
</Stack> </Stack>
); );
} }
FiveHundred.title = 'Zipline - 500';

View file

@ -213,4 +213,5 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
} else { } else {
return { notFound: true }; return { notFound: true };
} }
}; };

View file

@ -25,4 +25,6 @@ export default function Error({ statusCode }) {
export function getInitialProps({ res, err }) { export function getInitialProps({ res, err }) {
const statusCode = res ? res.statusCode : err ? err.statusCode : 404; const statusCode = res ? res.statusCode : err ? err.statusCode : 404;
return { pageProps: { statusCode } }; return { pageProps: { statusCode } };
} }
Error.title = 'Zipline - Something went wrong...';