notherbase-fs 3.0.2 → 3.0.4

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.
@@ -43,10 +43,6 @@ export default class Creation {
43
43
  main += `/${req.params.region}/${req.params.area}/${req.params.poi}/index`;
44
44
  siteTitle += req.params.poi;
45
45
  }
46
- else if (req.params.page) {
47
- main += `/${req.params.page}/index`;
48
- siteTitle = req.params.page;
49
- }
50
46
  else {
51
47
  main += `/the-front/index`;
52
48
  siteTitle += "the-front";
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/models/user.js CHANGED
@@ -99,7 +99,7 @@ export default class User extends Spirit {
99
99
  }
100
100
 
101
101
  offsetItem = async (name, offset) => {
102
- let item = Item.recallOne(name);
102
+ let item = await Item.recallOne(name);
103
103
 
104
104
  if (!item) return "Item not found in database.";
105
105
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notherbase-fs",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
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;