Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
CaramelKat authored Jul 24, 2024
1 parent 1fd50a2 commit c54e44f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let connection: mongoose.Connection;
mongoose.set('strictQuery', true);

export async function connect(): Promise<void> {
await mongoose.connect(`${uri}/${database}`, options);
await mongoose.connect(`${uri}/${database}`, options as mongoose.ConnectOptions);
connection = mongoose.connection;
connection.on('connected', function (this: mongoose.Connection) {
info(`MongoDB connected ${this.name}`);
Expand Down
4 changes: 2 additions & 2 deletions src/redisCache.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import redis from 'redis';
import { createClient } from 'redis';
import logger from '@/logger';
import config from '../config.json';

const { host, port } = config.redis;

export const redisClient = redis.createClient({ socket: { host, port } });
export const redisClient = createClient({ socket: { host, port } });

redisClient.on('error', (error) => {
logger.error(error);
Expand Down
2 changes: 1 addition & 1 deletion src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import bmp from 'bmp-js';
import crc32 from 'crc/crc32';
import crypto from 'crypto';
import HashMap from 'hashmap';
import grpc from 'nice-grpc';
import { createChannel, createClient, Metadata } from 'nice-grpc';
import pako from 'pako';
import { PNG } from 'pngjs';
import sharp from 'sharp';
Expand Down

0 comments on commit c54e44f

Please sign in to comment.