forked from FoundKeyGang/FoundKey
Refactor: Clean up
This commit is contained in:
parent
9e772626ce
commit
0aa6d848fa
1 changed files with 3 additions and 5 deletions
|
@ -23,7 +23,7 @@ export const path = (global as any).MISSKEY_CONFIG_PATH
|
||||||
/**
|
/**
|
||||||
* ユーザーが設定する必要のある情報
|
* ユーザーが設定する必要のある情報
|
||||||
*/
|
*/
|
||||||
interface ISource {
|
interface Source {
|
||||||
maintainer: string;
|
maintainer: string;
|
||||||
url: string;
|
url: string;
|
||||||
secondary_url: string;
|
secondary_url: string;
|
||||||
|
@ -83,12 +83,10 @@ interface Mixin {
|
||||||
drive_url: string;
|
drive_url: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type IConfig = ISource & Mixin;
|
|
||||||
|
|
||||||
export default function load() {
|
export default function load() {
|
||||||
const config = yaml.safeLoad(fs.readFileSync(path, 'utf-8')) as ISource;
|
const config = yaml.safeLoad(fs.readFileSync(path, 'utf-8')) as Source;
|
||||||
|
|
||||||
const mixin: Mixin = {} as Mixin;
|
const mixin = {} as Mixin;
|
||||||
|
|
||||||
// Validate URLs
|
// Validate URLs
|
||||||
if (!isUrl(config.url)) urlError(config.url);
|
if (!isUrl(config.url)) urlError(config.url);
|
||||||
|
|
Loading…
Reference in a new issue