@modular-rest/server 1.6.4 → 1.6.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modular-rest/server",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "a nodejs module based on KOAJS for developing Rest-APIs in a modular solution.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -22,8 +22,19 @@ module.exports.setup = async ({ keypair, adminUser, uploadDirectory }) => {
22
22
  * Insert permissions and admin user
23
23
  * for the first time
24
24
  */
25
- await DataInsertion.createPermissions();
26
- await DataInsertion.createAdminUser(adminUser);
25
+ await DataInsertion.createPermissions().catch((err) => {
26
+ console.log(
27
+ "Error while creating permissions, it seems data is already inserted.",
28
+ err
29
+ );
30
+ });
31
+
32
+ await DataInsertion.createAdminUser(adminUser).catch((err) => {
33
+ console.log(
34
+ "Error while creating admin user, it seems data is already inserted.",
35
+ err
36
+ );
37
+ });
27
38
 
28
39
  /**
29
40
  * File Service