mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: wip add submit function to store
This commit is contained in:
@@ -51,6 +51,20 @@ function createFeedbackStore() {
|
||||
feedback.elapsed = time;
|
||||
return feedback;
|
||||
});
|
||||
},
|
||||
submitFeedback: async (feedback: Record<string, unknown>) => {
|
||||
const response = await fetch('/v1/feedback', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
...feedback
|
||||
})
|
||||
});
|
||||
if (response.status !== 200) {
|
||||
throw new Error('Failed to submit feedback');
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user