Fix defaultPut suffix parameter

This commit is contained in:
Tulir Asokan 2019-07-16 03:16:37 +03:00
parent e5e614fc4b
commit 0488058a02

View File

@ -37,7 +37,7 @@ async function defaultDelete(type, id) {
} }
async function defaultPut(type, entry, id = undefined, suffix = undefined) { async function defaultPut(type, entry, id = undefined, suffix = undefined) {
const resp = await fetch(`${BASE_PATH}/${type}/${id || entry.id}${suffix}`, { const resp = await fetch(`${BASE_PATH}/${type}/${id || entry.id}${suffix || ''}`, {
headers: getHeaders(), headers: getHeaders(),
body: JSON.stringify(entry), body: JSON.stringify(entry),
method: "PUT", method: "PUT",