hola-server 0.5.4 → 0.5.6

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/db/entity.js CHANGED
@@ -138,6 +138,15 @@ class Entity {
138
138
  }
139
139
  }
140
140
 
141
+ if (param_obj["_id"] && param_obj["_id"].trim().length > 0) {
142
+ const ids = param_obj["_id"].split(",");
143
+ if (ids.length == 1) {
144
+ and_array.push(oid_query(ids[0]));
145
+ } else if (ids.length > 1) {
146
+ and_array.push(oid_queries(ids));
147
+ }
148
+ }
149
+
141
150
  if (and_array.length > 0) {
142
151
  query["$and"] = and_array;
143
152
 
package/http/express.js CHANGED
@@ -23,7 +23,7 @@ const is_excluded_url = (server, req) => {
23
23
  return false;
24
24
  }
25
25
 
26
- const init_express_server = (base_dir, callback) => {
26
+ const init_express_server = (base_dir, port_attr, callback) => {
27
27
  if (server_initialized === true) {
28
28
  return app;
29
29
  }
@@ -58,7 +58,7 @@ const init_express_server = (base_dir, callback) => {
58
58
  init_router_dirs(app, base_dir);
59
59
  handle_exception(app);
60
60
 
61
- app.listen(server.service_port, async function () {
61
+ app.listen(server[port_attr], async function () {
62
62
  if (callback) {
63
63
  await callback();
64
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hola-server",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "a meta programming framework used to build nodejs restful api",
5
5
  "main": "index.js",
6
6
  "scripts": {