forked from AkkomaGang/admin-fe
Fix updating instance docs
This commit is contained in:
parent
8015b3aa3a
commit
7f59ccb050
2 changed files with 3 additions and 2 deletions
|
@ -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())
|
||||
|
|
|
@ -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 }) {
|
||||
|
|
Loading…
Reference in a new issue