Skip to content

Commit

Permalink
fix: spread operator
Browse files Browse the repository at this point in the history
  • Loading branch information
kamerk22 committed Mar 21, 2019
1 parent 9748ff1 commit 8b531bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Create secured URLs with a limited lifetime in AdonisJs
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Build Status](https://www.travis-ci.org/kamerk22/adonis-url-signer.svg?branch=master)](https://www.travis-ci.org/kamerk22/adonis-url-signer)
[![Coverage Status](https://coveralls.io/repos/github/kamerk22/adonis-url-signer/badge.svg?branch=master)](https://coveralls.io/github/kamerk22/adonis-url-signer?branch=master)
<br/>

This library allows you to easily create "signed" URLs. These URLs have a "signature" hash appended as query string so we can easily verify that it's not manipulated.
Expand Down
5 changes: 1 addition & 4 deletions src/UrlSigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ class UrlSigner {
parameter[this.config.options.expires] =
Math.round(Date.now() / 1000) + expiration * 60 * 60
}
u.search = this._sortObject({
...u.query,
...parameter
})
u.search = this._sortObject(Object.assign({}, u.query, parameter))
u.search += `&${[`${this.config.options.signature}`]}=${this._makeSign(
u.format(),
this.config.signatureKey
Expand Down

0 comments on commit 8b531bd

Please sign in to comment.