You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
chore: move files to frontend
This commit is contained in:
16
frontend/src/api/settings.js
Normal file
16
frontend/src/api/settings.js
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user