feat: webhook add title and time
This commit is contained in:
parent
61c1b0e065
commit
a91d1ffffe
@ -1,6 +1,7 @@
|
|||||||
import { NotificationProvider } from './type';
|
import { NotificationProvider } from './type';
|
||||||
import { baseContentTokenizer } from '../token';
|
import { baseContentTokenizer } from '../token';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
interface WebhookPayload {
|
interface WebhookPayload {
|
||||||
webhookUrl: string;
|
webhookUrl: string;
|
||||||
@ -16,8 +17,10 @@ export const webhook: NotificationProvider = {
|
|||||||
|
|
||||||
await axios.post(webhookUrl, {
|
await axios.post(webhookUrl, {
|
||||||
notification,
|
notification,
|
||||||
|
title,
|
||||||
content,
|
content,
|
||||||
raw: message,
|
raw: message,
|
||||||
|
time: dayjs().toISOString(),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user