Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Commit ef40bdd

Browse files
Refactored lib
1 parent fb3eb5c commit ef40bdd

File tree

12 files changed

+8
-8
lines changed

12 files changed

+8
-8
lines changed

controllers/auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Request, Response } from "express";
22
import bcrypt from 'bcrypt';
3-
import { AuthenticationError, ServerError } from "../lib/errors";
4-
import JWT from "../lib/jwt";
3+
import { AuthenticationError, ServerError } from "../lib/responses/errors";
4+
import JWT from "../lib/helpers/jwt";
55
import Users, { User } from "../database/users";
6-
import SuccessResponse from "../lib/success-response";
6+
import SuccessResponse from "../lib/responses/success-response";
77

88
export default class AuthController {
99
static async login(req: Request, res: Response) {
File renamed without changes.

lib/jwt.ts renamed to lib/helpers/jwt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import jwt, { JwtPayload } from 'jsonwebtoken'
2-
import { User } from '../database/users';
2+
import { User } from '../../database/users';
33

44
export default class JWT {
55
/**
File renamed without changes.

middleware/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import jwt from '../lib/jwt'
2-
import { AuthenticationError } from '../lib/errors'
1+
import jwt from '../lib/helpers/jwt'
2+
import { AuthenticationError } from '../lib/responses/errors'
33
import { NextFunction, Request, Response } from 'express';
44
import Users, { User } from '../database/users';
55

0 commit comments

Comments
 (0)