mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-27 22:24:43 -05:00
init 2
This commit is contained in:
27
frontend/src/api/settings.js
Normal file
27
frontend/src/api/settings.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { baseURL } from "./api-utils";
|
||||
import { apiReq } from "./api-utils";
|
||||
|
||||
const settingsBase = baseURL + "site-settings/";
|
||||
|
||||
const settingsURLs = {
|
||||
siteSettings: `${settingsBase}`,
|
||||
updateSiteSettings: `${settingsBase}update/`,
|
||||
testWebhooks: `${settingsBase}webhooks/test/`,
|
||||
};
|
||||
|
||||
export default {
|
||||
async requestAll() {
|
||||
let response = await apiReq.get(settingsURLs.siteSettings);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async testWebhooks() {
|
||||
let response = await apiReq.post(settingsURLs.testWebhooks);
|
||||
return response.data;
|
||||
},
|
||||
|
||||
async update(body) {
|
||||
let response = await apiReq.post(settingsURLs.updateSiteSettings, body);
|
||||
return response.data;
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user