chore: move files to frontend

This commit is contained in:
Henrique Dias
2019-05-21 11:13:59 +01:00
parent d45d7f92fb
commit 7414ca10b3
137 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { fetchURL, fetchJSON } from './utils'
export function get () {
return fetchJSON(`/api/settings`, {})
}
export async function update (settings) {
const res = await fetchURL(`/api/settings`, {
method: 'PUT',
body: JSON.stringify(settings)
})
if (res.status !== 200) {
throw new Error(res.status)
}
}