From e2bf2715a6462ed377b033956d65260157f042ea Mon Sep 17 00:00:00 2001 From: Johann150 Date: Thu, 4 Aug 2022 10:20:48 +0200 Subject: [PATCH] fix spelling error --- packages/backend/src/db/redis.ts | 4 ++-- packages/backend/src/misc/antenna-cache.ts | 4 ++-- packages/backend/src/misc/webhook-cache.ts | 4 ++-- packages/backend/src/server/api/streaming.ts | 2 +- packages/backend/src/services/user-cache.ts | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/backend/src/db/redis.ts b/packages/backend/src/db/redis.ts index 1843d2317..cd9c81eb3 100644 --- a/packages/backend/src/db/redis.ts +++ b/packages/backend/src/db/redis.ts @@ -12,7 +12,7 @@ export function createConnection() { }); } -export const subsdcriber = createConnection(); -subsdcriber.subscribe(config.host); +export const subscriber = createConnection(); +subscriber.subscribe(config.host); export const redisClient = createConnection(); diff --git a/packages/backend/src/misc/antenna-cache.ts b/packages/backend/src/misc/antenna-cache.ts index 4ea5a29df..97249c146 100644 --- a/packages/backend/src/misc/antenna-cache.ts +++ b/packages/backend/src/misc/antenna-cache.ts @@ -1,6 +1,6 @@ import { Antennas } from '@/models/index.js'; import { Antenna } from '@/models/entities/antenna.js'; -import { subsdcriber } from '@/db/redis.js'; +import { subscriber } from '@/db/redis.js'; let antennasFetched = false; let antennas: Antenna[] = []; @@ -14,7 +14,7 @@ export async function getAntennas() { return antennas; } -subsdcriber.on('message', async (_, data) => { +subscriber.on('message', async (_, data) => { const obj = JSON.parse(data); if (obj.channel === 'internal') { diff --git a/packages/backend/src/misc/webhook-cache.ts b/packages/backend/src/misc/webhook-cache.ts index 478f22d9c..5e72dbd92 100644 --- a/packages/backend/src/misc/webhook-cache.ts +++ b/packages/backend/src/misc/webhook-cache.ts @@ -1,6 +1,6 @@ import { Webhooks } from '@/models/index.js'; import { Webhook } from '@/models/entities/webhook.js'; -import { subsdcriber } from '@/db/redis.js'; +import { subscriber } from '@/db/redis.js'; let webhooksFetched = false; let webhooks: Webhook[] = []; @@ -16,7 +16,7 @@ export async function getActiveWebhooks() { return webhooks; } -subsdcriber.on('message', async (_, data) => { +subscriber.on('message', async (_, data) => { const obj = JSON.parse(data); if (obj.channel === 'internal') { diff --git a/packages/backend/src/server/api/streaming.ts b/packages/backend/src/server/api/streaming.ts index 6d430a938..7cf365faf 100644 --- a/packages/backend/src/server/api/streaming.ts +++ b/packages/backend/src/server/api/streaming.ts @@ -3,7 +3,7 @@ import { EventEmitter } from 'events'; import { ParsedUrlQuery } from 'querystring'; import * as websocket from 'websocket'; -import { subsdcriber as redisClient } from '@/db/redis.js'; +import { subscriber as redisClient } from '@/db/redis.js'; import { Users } from '@/models/index.js'; import MainStreamConnection from './stream/index.js'; import authenticate from './authenticate.js'; diff --git a/packages/backend/src/services/user-cache.ts b/packages/backend/src/services/user-cache.ts index 39b9e98eb..d95a8968a 100644 --- a/packages/backend/src/services/user-cache.ts +++ b/packages/backend/src/services/user-cache.ts @@ -1,14 +1,14 @@ import { CacheableLocalUser, CacheableUser, ILocalUser } from '@/models/entities/user.js'; import { Users } from '@/models/index.js'; import { Cache } from '@/misc/cache.js'; -import { subsdcriber } from '@/db/redis.js'; +import { subscriber } from '@/db/redis.js'; export const userByIdCache = new Cache(Infinity); export const localUserByNativeTokenCache = new Cache(Infinity); export const localUserByIdCache = new Cache(Infinity); export const uriPersonCache = new Cache(Infinity); -subsdcriber.on('message', async (_, data) => { +subscriber.on('message', async (_, data) => { const obj = JSON.parse(data); if (obj.channel === 'internal') {