Fix updating instance docs

This commit is contained in:
Angelina Filippova 2020-09-17 03:29:59 +03:00
parent 8015b3aa3a
commit 7f59ccb050
2 changed files with 3 additions and 2 deletions

View file

@ -43,7 +43,7 @@ export async function updateInstanceDocument(name, formData, authHost, token) {
return fetch(url, {
body: formData,
method: 'patch',
method: 'PATCH',
headers: authHeaders(token)
})
.then((data) => data.json())

View file

@ -132,7 +132,8 @@ const settings = {
},
async UpdateInstanceDocs({ getters }, { name, content }) {
const formData = new FormData()
formData.append('file', content)
const blob = new Blob([content], { type: 'text/html' })
formData.append('file', blob)
await updateInstanceDocument(name, formData, getters.authHost, getters.token)
},
UpdateSettings({ commit }, { group, key, input, value, type }) {