Skip to content

Commit

Permalink
set page_size
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeshkhadka committed Apr 19, 2024
1 parent 1c9debf commit cc84c28
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/db.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PrismaClient } from "@prisma/client";

const prisma = new PrismaClient();

export const PAGE_SIZE = 10;
export default prisma;
2 changes: 1 addition & 1 deletion src/handlers/contribution.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextFunction, Request, Response } from "express";
import prisma from "../db.js";
import prisma, { PAGE_SIZE } from "../db.js";
import CustomError from "../modules/errors.js";
export async function approveContribution(
req: Request,
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/task.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NextFunction, Request, Response } from "express";
import prisma from "../db.js";
import prisma, { PAGE_SIZE } from "../db.js";
import CustomError from "../modules/errors.js";

export async function createTask(
Expand Down
1 change: 0 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { User } from "./modules/auth.ts";
declare global {
const PAGE_SIZE = 10;
namespace Express {
export interface Request {
user?: User;
Expand Down

0 comments on commit cc84c28

Please sign in to comment.