mirror of
https://github.com/fmhy/edit.git
synced 2026-02-19 01:31:41 +11:00
fix
This commit is contained in:
parent
b21fae6c30
commit
e6aecf98a1
1 changed files with 3 additions and 3 deletions
|
|
@ -30,7 +30,7 @@ export default defineEventHandler(async (event) => {
|
||||||
if (!["bug", "suggestion", "other", "appreciate"].includes(feedbackType!) || !message) {
|
if (!["bug", "suggestion", "other", "appreciate"].includes(feedbackType!) || !message) {
|
||||||
throw new Error("Invalid input.");
|
throw new Error("Invalid input.");
|
||||||
}
|
}
|
||||||
|
console.log(env.WEBHOOK_URL);
|
||||||
await fetcher()
|
await fetcher()
|
||||||
.post(env.WEBHOOK_URL, {
|
.post(env.WEBHOOK_URL, {
|
||||||
username: "Feedback",
|
username: "Feedback",
|
||||||
|
|
@ -43,8 +43,8 @@ export default defineEventHandler(async (event) => {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
.catch(({ status, error }) => {
|
.catch((error) => {
|
||||||
throw new Error(`Error code ${status}: ${error}`);
|
throw new Error(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue