-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
prisma/pgsql/migrations/20210426145530_project_webhook/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- AlterTable | ||
ALTER TABLE "projects" ADD COLUMN "webhook" TEXT, | ||
ADD COLUMN "enableWebhook" BOOLEAN; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Webhook | ||
|
||
In addition to get new comment notification from Email, we also provide Webhook. | ||
|
||
## Enable | ||
|
||
To enable webhook for project, in `Project` -> `Settings`, save your webhook url and turn on the switch button. | ||
|
||
![](../images/enable_webhook.png ':size=500') | ||
|
||
## Reference | ||
|
||
### New comment | ||
|
||
When new comment comes in, Cusdis will make a `POST` request to your webhook, with below data: | ||
|
||
```js | ||
{ | ||
"type": "new_comment", | ||
"data": { | ||
"by_nickname": "xxx", | ||
"by_email": "xxx", | ||
"content": "xxx", | ||
"page_id": "xxx", | ||
"page_title": "xxx", // page title, maybe NULL | ||
"project_title": "haha", // project title | ||
"approve_link": "" // use this link to approve this comment without login | ||
} | ||
} | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.