Skip to content

Commit

Permalink
Create data-validation library
Browse files Browse the repository at this point in the history
  • Loading branch information
SafdarJamal committed Jul 29, 2020
1 parent 1eb367e commit c630dce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/entries/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const express = require('express');
const router = express.Router();

const Entry = require('../../models/Entry');
const validateEntry = require('../../validation/validateEntry');
const { validateEntry } = require('../../validation');

router.get('/', (req, res) => res.render('pages/entries/new', { error: null }));

Expand Down
1 change: 1 addition & 0 deletions src/validation/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports.validateEntry = require('./validateEntry');

0 comments on commit c630dce

Please sign in to comment.