Skip to content

Commit

Permalink
fix-krishnaacharyaa#418: fixed the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
AMS003010 committed Jun 20, 2024
1 parent e762c3a commit dc20c6b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/controllers/user-controller.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HTTP_STATUS, RESPONSE_MESSAGES } from '../utils/constants.js';
import User from '../models/user.js';
import { Role } from '../types/role-type.tsx';
import { Role } from '../types/role-type.js';

export const getAllUserHandler = async (req, res) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion backend/middlewares/auth-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { JWT_SECRET } from '../config/utils.js';
import { ApiError } from '../utils/api-error.js';
import { HTTP_STATUS, RESPONSE_MESSAGES } from '../utils/constants.js';
import jwt from 'jsonwebtoken';
import { Role } from '../types/role-type.tsx';
import { Role } from '../types/role-type.js';

export const authMiddleware = async (req, res, next) => {
const token = req.cookies?.access_token;
Expand Down
2 changes: 1 addition & 1 deletion backend/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import JWT from 'jsonwebtoken';
import bcrypt from 'bcryptjs';
import crypto from 'crypto';
import { ACCESS_TOKEN_EXPIRES_IN, JWT_SECRET, REFRESH_TOKEN_EXPIRES_IN } from '../config/utils.js';
import { Role } from '../types/role-type.tsx';
import { Role } from '../types/role-type.js';

const userSchema = new Schema(
{
Expand Down
4 changes: 4 additions & 0 deletions backend/types/role-type.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const Role = {
Admin: 'ADMIN',
User: 'USER',
};
4 changes: 0 additions & 4 deletions backend/types/role-type.tsx

This file was deleted.

0 comments on commit dc20c6b

Please sign in to comment.