From 44efff342db4ed0939d47b4a49d27f4df588a0d8 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> Date: Sun, 12 Dec 2021 14:55:38 -0500 Subject: [PATCH] Update js/src/common/Model.ts Co-authored-by: David Wheatley --- js/src/common/Model.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/src/common/Model.ts b/js/src/common/Model.ts index e5ddcb190..a255e6d1f 100644 --- a/js/src/common/Model.ts +++ b/js/src/common/Model.ts @@ -204,14 +204,12 @@ export default abstract class Model { return app .request( - Object.assign( - { - method: this.exists ? 'PATCH' : 'POST', - url: app.forum.attribute('apiUrl') + this.apiEndpoint(), - body: request, - }, - options - ) + { + method: this.exists ? 'PATCH' : 'POST', + url: app.forum.attribute('apiUrl') + this.apiEndpoint(), + body: request, + ...options, + }, ) .then( // If everything went well, we'll make sure the store knows that this