summaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-24 12:53:22 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-24 12:53:22 +0900
commit9b79a411e0d0ecd57c52f0878d2873f925eebc4f (patch)
tree4ffe7b6376f35fc2620459669a407612f8f70ce6 /src/config
parentImprove doc (diff)
downloadmisskey-9b79a411e0d0ecd57c52f0878d2873f925eebc4f.tar.gz
misskey-9b79a411e0d0ecd57c52f0878d2873f925eebc4f.tar.bz2
misskey-9b79a411e0d0ecd57c52f0878d2873f925eebc4f.zip
Use camelCase
Diffstat (limited to 'src/config')
-rw-r--r--src/config/load.ts16
-rw-r--r--src/config/types.ts16
2 files changed, 12 insertions, 20 deletions
diff --git a/src/config/load.ts b/src/config/load.ts
index 3a82d45b41..7a4323817f 100644
--- a/src/config/load.ts
+++ b/src/config/load.ts
@@ -32,16 +32,12 @@ export default function load() {
mixin.host = url.host;
mixin.hostname = url.hostname;
mixin.scheme = url.protocol.replace(/:$/, '');
- mixin.ws_scheme = mixin.scheme.replace('http', 'ws');
- mixin.ws_url = `${mixin.ws_scheme}://${mixin.host}`;
- mixin.api_url = `${mixin.scheme}://${mixin.host}/api`;
- mixin.auth_url = `${mixin.scheme}://${mixin.host}/auth`;
- mixin.dev_url = `${mixin.scheme}://${mixin.host}/dev`;
- mixin.docs_url = `${mixin.scheme}://${mixin.host}/docs`;
- mixin.stats_url = `${mixin.scheme}://${mixin.host}/stats`;
- mixin.status_url = `${mixin.scheme}://${mixin.host}/status`;
- mixin.drive_url = `${mixin.scheme}://${mixin.host}/files`;
- mixin.user_agent = `Misskey/${pkg.version} (${config.url})`;
+ mixin.wsScheme = mixin.scheme.replace('http', 'ws');
+ mixin.wsUrl = `${mixin.wsScheme}://${mixin.host}`;
+ mixin.apiUrl = `${mixin.scheme}://${mixin.host}/api`;
+ mixin.authUrl = `${mixin.scheme}://${mixin.host}/auth`;
+ mixin.driveUrl = `${mixin.scheme}://${mixin.host}/files`;
+ mixin.userAgent = `Misskey/${pkg.version} (${config.url})`;
if (config.autoAdmin == null) config.autoAdmin = false;
diff --git a/src/config/types.ts b/src/config/types.ts
index 2ce9c0c80d..51b76262a9 100644
--- a/src/config/types.ts
+++ b/src/config/types.ts
@@ -49,16 +49,12 @@ export type Mixin = {
host: string;
hostname: string;
scheme: string;
- ws_scheme: string;
- api_url: string;
- ws_url: string;
- auth_url: string;
- docs_url: string;
- stats_url: string;
- status_url: string;
- dev_url: string;
- drive_url: string;
- user_agent: string;
+ wsScheme: string;
+ apiUrl: string;
+ wsUrl: string;
+ authUrl: string;
+ driveUrl: string;
+ userAgent: string;
};
export type Config = Source & Mixin;