Skip to content

Commit

Permalink
Move middleware into lib folder
Browse files Browse the repository at this point in the history
This moves the `middleware` folder into the `lib` folder and updates file references to them.

This is to enable easier updates to the kit in future, as the main folder to copy across will just be the `lib` one.
  • Loading branch information
frankieroberto committed Dec 10, 2024
1 parent c19e71c commit e6e0e12
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ dotenv.config();

// Local dependencies
const packageInfo = require('./package.json');
const authentication = require('./middleware/authentication');
const automaticRouting = require('./middleware/auto-routing');
const authentication = require('./lib/middleware/authentication');
const automaticRouting = require('./lib/middleware/auto-routing');
const config = require('./app/config');
const locals = require('./app/locals');
const routes = require('./app/routes');
const utils = require('./lib/utils');

const prototypeAdminRoutes = require('./middleware/prototype-admin-routes');
const prototypeAdminRoutes = require('./lib/middleware/prototype-admin-routes');
const exampleTemplatesRoutes = require('./lib/example_templates_routes');

// Set configuration variables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const url = require('url');
const { encryptPassword } = require('../lib/utils');
const { encryptPassword } = require('../utils');

const allowedPathsWhenUnauthenticated = [
'/prototype-admin/password',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const router = express.Router();

const password = process.env.PROTOTYPE_PASSWORD;

const { encryptPassword } = require('../lib/utils');
const { encryptPassword } = require('../utils');

router.get('/password', (req, res) => {
const returnURL = req.query.returnURL || '/';
Expand Down

0 comments on commit e6e0e12

Please sign in to comment.