diff --git a/README.md b/README.md index e35ae63..4428c75 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Add the following to your model's `boot` method: ```js class MyModel extends Model { - boot () { + static boot () { super.boot() this.addTrait('@provider:Auditable') } @@ -65,7 +65,9 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file ## Changelog - +- v2.0.2 + - Fixed bugs for AdonisJS 4.1. + - v2.0.1 - Removed need to pass in `ctx` parameters. - Update README and instructions.md files. @@ -76,4 +78,4 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file - Added this changelog. - v1.0.1 - - Initial release. \ No newline at end of file + - Initial release. diff --git a/src/Traits/Auditable.js b/src/Traits/Auditable.js index 68fb4b1..15df731 100644 --- a/src/Traits/Auditable.js +++ b/src/Traits/Auditable.js @@ -123,7 +123,7 @@ async function createAudit (event, {request, auth}, auditable, auditableId, oldD // get user data to store const userId = _.get(auth, 'user.id', null) - const url = request.absoluteUrl() + const url = request.originalUrl() const ip = request.ip() // save audit