16 lines
388 B
JavaScript
16 lines
388 B
JavaScript
export const usePeerSupport = () => {
|
|
const updateSettings = async (settings) => {
|
|
return await $fetch('/api/members/me/peer-support', {
|
|
method: 'PATCH',
|
|
body: settings
|
|
});
|
|
};
|
|
|
|
const getSupporters = async (topic) => {
|
|
return await $fetch('/api/peer-support', {
|
|
query: topic ? { topic } : {}
|
|
});
|
|
};
|
|
|
|
return { updateSettings, getSupporters };
|
|
};
|