MT#62983 bugfix apiGet and apiPost

apiGet and apiPost assign the full options
object to the variable path
rather then options.path
In this commit we fix the bug.

Change-Id: I2379c4038a7fb70183ad2c6a25252413895122ad
mr13.4
Debora Crescenzo 4 months ago
parent 8fc8a99ff0
commit 38c2f37c1a

@ -363,7 +363,7 @@ export async function apiGet (options = {
resourceId: undefined, resourceId: undefined,
config: {} config: {}
}) { }) {
let path = options let path = options.path
if (options.resource && options.resourceId) { if (options.resource && options.resourceId) {
path = `api/${options.resource}/${options.resourceId}` path = `api/${options.resource}/${options.resourceId}`
} else if (options.resource) { } else if (options.resource) {
@ -376,7 +376,7 @@ export async function apiPost (options = {
data: undefined, data: undefined,
config: {} config: {}
}) { }) {
let path = options let path = options.path
if (options.resource) { if (options.resource) {
path = `${options.resource}/` path = `${options.resource}/`
} }

Loading…
Cancel
Save