Skip to content

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
cygaar committed Nov 29, 2024
1 parent 2a03469 commit a336029
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/adapter-postgres/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { v4 } from "uuid";
// Import the entire module as default
import pg from "pg";
const { Pool } = pg;
type Pool = pg.Pool;
type PoolType = pg.Pool;

import {
QueryConfig,
Expand All @@ -29,16 +29,14 @@ import fs from "fs";
import { fileURLToPath } from "url";
import path from "path";

const { DatabaseError } = pg;

const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
const __dirname = path.dirname(__filename); // get the name of the directory

export class PostgresDatabaseAdapter
extends DatabaseAdapter<Pool>
extends DatabaseAdapter<PoolType>
implements IDatabaseCacheAdapter
{
private pool: Pool;
private pool: PoolType;
private readonly maxRetries: number = 3;
private readonly baseDelay: number = 1000; // 1 second
private readonly maxDelay: number = 10000; // 10 seconds
Expand Down Expand Up @@ -758,7 +756,7 @@ export class PostgresDatabaseAdapter
return this.withRetry(async () => {
try {
const relationshipId = v4();
const result = await this.pool.query(
await this.pool.query(
`INSERT INTO relationships (id, "userA", "userB", "userId")
VALUES ($1, $2, $3, $4)
RETURNING id`,
Expand Down

0 comments on commit a336029

Please sign in to comment.