Refactor: Clean up

This commit is contained in:
syuilo 2017-02-08 23:52:14 +09:00
parent 92bd5c6c1f
commit 8998f5d591

View File

@ -23,7 +23,7 @@ export const path = (global as any).MISSKEY_CONFIG_PATH
/**
*
*/
interface ISource {
interface Source {
maintainer: string;
url: string;
secondary_url: string;
@ -83,12 +83,10 @@ interface Mixin {
drive_url: string;
}
export type IConfig = ISource & Mixin;
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
if (!isUrl(config.url)) urlError(config.url);