Skip to content

Commit

Permalink
Change file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcrammer committed Mar 25, 2024
1 parent b92f5f6 commit cae4b2e
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 14 deletions.
3 changes: 0 additions & 3 deletions .vscode/extensions.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "dotenv/config"
import cors from "cors"
import cookieParser from "cookie-parser"
import helmet from "helmet"
import sequelize from "../config/database"
import sequelize from "./config/database"
import requireSSL from "./middleware/requireSSL"

// Routes
Expand All @@ -18,7 +18,7 @@ import totpRoutes from "./routes/totpRoutes"

// DB Models

import "../models/index"
import "./models/index"

const PORT = process.env.PORT || 3000
const app = Express()
Expand Down
4 changes: 2 additions & 2 deletions src/classes/authFactorClass.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import AuthFactorModel from "../../models/AuthFactor"
import User from "../../models/User"
import AuthFactorModel from "../models/AuthFactor"
import User from "../models/User"
import CodedError from "../config/CodedError"

/**
Expand Down
4 changes: 2 additions & 2 deletions src/classes/capabilitiesClass.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import CapabilityModel from "../../models/Capability"
import RoleModel from "../../models/Role"
import CapabilityModel from "../models/Capability"
import RoleModel from "../models/Role"
import CodedError from "../config/CodedError"

class Capability {
Expand Down
2 changes: 1 addition & 1 deletion src/classes/jwtClass.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import jwt from "jsonwebtoken"
import CodedError from "../config/CodedError"
import Token from "../../models/Token"
import Token from "../models/Token"

/**
* The Standard payload for a JWT token
Expand Down
4 changes: 2 additions & 2 deletions src/classes/rolesClass.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import RoleModel from "../../models/Role"
import CapabilityModel from "../../models/Capability"
import RoleModel from "../models/Role"
import CapabilityModel from "../models/Capability"
import Capability from "./capabilitiesClass"
import CodedError from "../config/CodedError"

Expand Down
2 changes: 1 addition & 1 deletion src/classes/totpClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as OTPAuth from "otpauth"
import crypto from "crypto"
import base32 from "hi-base32"
import AuthFactor from "./authFactorClass"
import User from "../../models/User"
import User from "../models/User"
import CodedError from "../config/CodedError"

/**
Expand Down
2 changes: 1 addition & 1 deletion src/classes/usersClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import isJWT from "validator/lib/isJWT"
import CodedError from "../config/CodedError"
import JWT from "./jwtClass"
import Role from "./rolesClass"
import UserModel from "../../models/User"
import UserModel from "../models/User"

/**
* Default data to create a new user
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit cae4b2e

Please sign in to comment.