mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-15 20:38:06 +08:00
31 lines
766 B
Vue
31 lines
766 B
Vue
<script setup lang="ts">
|
|
// @ts-ignore
|
|
import { api } from '../../api'
|
|
|
|
// @ts-ignore
|
|
import WebhookComponent from '../../components/WebhookComponent.vue'
|
|
|
|
const fetchData = async () => {
|
|
return await api.fetch(`/admin/mail_webhook/settings`)
|
|
}
|
|
|
|
const saveSettings = async (webhookSettings: any) => {
|
|
await api.fetch(`/admin/mail_webhook/settings`, {
|
|
method: 'POST',
|
|
body: JSON.stringify(webhookSettings),
|
|
})
|
|
}
|
|
|
|
const testSettings = async (webhookSettings: any) => {
|
|
await api.fetch(`/admin/mail_webhook/test`, {
|
|
method: 'POST',
|
|
body: JSON.stringify(webhookSettings),
|
|
})
|
|
}
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<WebhookComponent :fetchData="fetchData" :saveSettings="saveSettings" :testSettings="testSettings" />
|
|
</template>
|