Skip to content

Commit a336029

Browse files
committed
Fix eslint
1 parent 2a03469 commit a336029

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/adapter-postgres/src/index.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { v4 } from "uuid";
33
// Import the entire module as default
44
import pg from "pg";
55
const { Pool } = pg;
6-
type Pool = pg.Pool;
6+
type PoolType = pg.Pool;
77

88
import {
99
QueryConfig,
@@ -29,16 +29,14 @@ import fs from "fs";
2929
import { fileURLToPath } from "url";
3030
import path from "path";
3131

32-
const { DatabaseError } = pg;
33-
3432
const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
3533
const __dirname = path.dirname(__filename); // get the name of the directory
3634

3735
export class PostgresDatabaseAdapter
38-
extends DatabaseAdapter<Pool>
36+
extends DatabaseAdapter<PoolType>
3937
implements IDatabaseCacheAdapter
4038
{
41-
private pool: Pool;
39+
private pool: PoolType;
4240
private readonly maxRetries: number = 3;
4341
private readonly baseDelay: number = 1000; // 1 second
4442
private readonly maxDelay: number = 10000; // 10 seconds
@@ -758,7 +756,7 @@ export class PostgresDatabaseAdapter
758756
return this.withRetry(async () => {
759757
try {
760758
const relationshipId = v4();
761-
const result = await this.pool.query(
759+
await this.pool.query(
762760
`INSERT INTO relationships (id, "userA", "userB", "userId")
763761
VALUES ($1, $2, $3, $4)
764762
RETURNING id`,

0 commit comments

Comments
 (0)