mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-08-02 12:16:06 -04:00
36 lines
843 B
JavaScript
36 lines
843 B
JavaScript
import { ref } from "vue";
|
|
import { request } from '@/helpers/axios';
|
|
import { defineStore } from "pinia";
|
|
|
|
export const useSetting = defineStore('settings', () => {
|
|
function getSettingValue(name) {
|
|
return request().get(route("frontend.setting.value"), {
|
|
params: {
|
|
name,
|
|
},
|
|
});
|
|
}
|
|
|
|
function getJsonSettingValue(name) {
|
|
return request().get(route("frontend.setting.json"), {
|
|
params: {
|
|
name,
|
|
},
|
|
});
|
|
}
|
|
|
|
function updateSetting(name, value, json) {
|
|
return request().post(route("frontend.setting.update"), {
|
|
_method: "PUT",
|
|
name,
|
|
value,
|
|
json,
|
|
});
|
|
}
|
|
|
|
return {
|
|
getSettingValue,
|
|
getJsonSettingValue,
|
|
updateSetting,
|
|
};
|
|
}); |