Skip to content

Commit

Permalink
feat(Socket): Use querystrings for collection filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbo2002 committed Aug 18, 2020
1 parent a29038a commit 540f396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/socketRequestHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ class SocketRequestHandler {
const Logic = this.Logic;
const method = 'serve' + this.route.substr(0, 1).toUpperCase() + this.route.substr(1);

const parameters = new URLSearchParams(this.data.id);
const params = {};
(this.data.id || '').split('/').filter(Boolean).forEach(part => {
const p = part.split(':', 2);
params[p[0]] = p[1] !== undefined ? p[1] : true;
parameters.forEach((value, key) => {
params[key] = value;
});

const options = {
Expand Down

0 comments on commit 540f396

Please sign in to comment.