notherbase-fs 3.0.2 → 3.0.3

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.
package/models/index.js CHANGED
@@ -63,11 +63,30 @@ catch (err) {
63
63
 
64
64
  // user.find({}, async (err, users) => {
65
65
  // for (let i = 0; i < users.length; i++) {
66
- // let userSpirit = await User.create(
67
- // users[i].username,
68
- // users[i].password,
69
- // users[i].email
70
- // );
66
+ // let userSpirit = await Spirit.create({
67
+ // route: "/",
68
+ // service: "user",
69
+ // scope: "global",
70
+ // parent: null,
71
+ // _lastUpdate: Date.now()
72
+ // }, {
73
+ // username: users[i].username,
74
+ // password: users[i].password,
75
+ // email: users[i].email,
76
+ // resetToken: null,
77
+ // resetExp: null,
78
+ // coin: 0,
79
+ // home: "/",
80
+ // authLevels: [ "Basic" ],
81
+ // location: "/the-front",
82
+ // attributes: {
83
+ // translation: 0,
84
+ // strength: 0,
85
+ // agility: 0,
86
+ // defense: 0
87
+ // },
88
+ // inventory: []
89
+ // });
71
90
 
72
91
  // let foundPages = await page.find({ user: users[i]._id });
73
92
 
package/models/spirit.js CHANGED
@@ -92,6 +92,7 @@ export default class Spirit {
92
92
  return spirit;
93
93
  }
94
94
  else {
95
+ options._lastUpdate = Date.now();
95
96
  let newSpirit = await Spirit.create(options, initdata);
96
97
  return newSpirit;
97
98
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "description": "Functions to help make developing for NotherBase easier.",
5
5
  "exports": "./notherbase-fs.js",
6
6
  "scripts": {
@@ -6,7 +6,7 @@ class Base {
6
6
 
7
7
  await $.post(route, JSON.stringify(body), (res) => {
8
8
  response = res;
9
- if (res.status != "success") console.log(`${route} - ${res}`);
9
+ if (res.status != "success") console.log(`${route} - ${res.message}`);
10
10
  });
11
11
 
12
12
  return response;