notherbase-fs 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,7 +5,7 @@ let serve = async (req, scriptPath) => {
5
5
  let script, result = null;
6
6
 
7
7
  if (fs.existsSync(scriptPath)) {
8
- let user = findUser(req);
8
+ let user = await findUser(req);
9
9
 
10
10
  script = await import(scriptPath);
11
11
  result = await script.default(req, user);
@@ -48,7 +48,7 @@ export default {
48
48
  register: async (req) => {
49
49
  check(req.body.data.password.length > 7, "Password too short.");
50
50
  check(req.body.data.email.length > 7, "Email too short.");
51
- check(req.body.data.email.username > 2, "Username too short.");
51
+ check(req.body.data.username.length > 2, "Username too short.");
52
52
 
53
53
  let user = new req.db.User("user", req.body.data.email);
54
54
  let userData = await user.recall();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Functions to help make developing for NotherBase easier.",
5
5
  "exports": "./notherbase-fs.js",
6
6
  "scripts": {
@@ -1,3 +0,0 @@
1
- export default async (req, user) => {
2
-
3
- }