summaryrefslogtreecommitdiff
path: root/src/services/register-instance.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-07 15:00:44 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-07 15:00:44 +0900
commit336912e4422394499cb47ea1b8d42cf2020ec93f (patch)
tree0bd8c6ef58834a2640ae83b56cb7b70cd756790b /src/services/register-instance.ts
parent10.82.3 (diff)
downloadsharkey-336912e4422394499cb47ea1b8d42cf2020ec93f.tar.gz
sharkey-336912e4422394499cb47ea1b8d42cf2020ec93f.tar.bz2
sharkey-336912e4422394499cb47ea1b8d42cf2020ec93f.zip
Improve instance stats
Diffstat (limited to 'src/services/register-instance.ts')
-rw-r--r--src/services/register-instance.ts22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/services/register-instance.ts b/src/services/register-instance.ts
deleted file mode 100644
index 6576a9ed06..0000000000
--- a/src/services/register-instance.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import Instance, { IInstance } from '../models/instance';
-import federationChart from '../chart/federation';
-
-export default async function(host: string): Promise<IInstance> {
- if (host == null) return null;
-
- const index = await Instance.findOne({ host });
-
- if (index == null) {
- const i = await Instance.insert({
- host,
- caughtAt: new Date(),
- system: null // TODO
- });
-
- federationChart.update(true);
-
- return i;
- } else {
- return index;
- }
-}