chore: move files to frontend
This commit is contained in:
1 parent
d45d7f92fb
commit
7414ca10b3
137 files changed
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user