Add peer support functionality and UI
This commit is contained in:
parent
2b55ca4104
commit
1b8dacf92a
11 changed files with 1159 additions and 35 deletions
16
app/composables/usePeerSupport.js
Normal file
16
app/composables/usePeerSupport.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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 };
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue