Slack endpoint.
This commit is contained in:
parent
fd947ac105
commit
c4095d9baf
@ -3,3 +3,7 @@
|
|||||||
### Usage
|
### Usage
|
||||||
> POST /generic/{matrixRoom}/{matrixUser}/{matrixPassword}
|
> POST /generic/{matrixRoom}/{matrixUser}/{matrixPassword}
|
||||||
This is a generic handler that will accept any form of data and pass it through to Matrix using the appropriate JSON format.
|
This is a generic handler that will accept any form of data and pass it through to Matrix using the appropriate JSON format.
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
> POST /slack/{matrixRoom}/{matrixUser}/{matrixPassword}
|
||||||
|
This is a Slack-friendly handler that will accept any form of Slack data and pass through just the text to Matrix using the appropriate JSON format.
|
||||||
|
@ -32,6 +32,7 @@ func Run(info *router.BuildInfo) error {
|
|||||||
router := router.NewRouter(info)
|
router := router.NewRouter(info)
|
||||||
|
|
||||||
router.HandleWithMetrics("/generic/{matrixRoom}/{matrixUser}/{matrixPassword}", generic.Handle(conf)).Methods(http.MethodPost)
|
router.HandleWithMetrics("/generic/{matrixRoom}/{matrixUser}/{matrixPassword}", generic.Handle(conf)).Methods(http.MethodPost)
|
||||||
|
router.HandleWithMetrics("/slack/{matrixRoom}/{matrixUser}/{matrixPassword}", generic.Handle(conf)).Methods(http.MethodPost)
|
||||||
|
|
||||||
srv := http.Server{
|
srv := http.Server{
|
||||||
Addr: fmt.Sprintf(":%d", conf.Port),
|
Addr: fmt.Sprintf(":%d", conf.Port),
|
||||||
|
Loading…
Reference in New Issue
Block a user