mirror of
https://github.com/Luzifer/twitch-manager.git
synced 2024-12-30 08:31:18 +00:00
Fix: Add support for variant in API
This commit is contained in:
parent
79fd31ec4e
commit
d1932e2fbd
1 changed files with 4 additions and 3 deletions
7
api.go
7
api.go
|
@ -99,9 +99,10 @@ func registerAPI(r *mux.Router) {
|
||||||
|
|
||||||
func handleCustomAlert(w http.ResponseWriter, r *http.Request) {
|
func handleCustomAlert(w http.ResponseWriter, r *http.Request) {
|
||||||
var alert struct {
|
var alert struct {
|
||||||
Sound *string `json:"sound"`
|
Sound *string `json:"sound"`
|
||||||
Text string `json:"text"`
|
Text string `json:"text"`
|
||||||
Title string `json:"title"`
|
Title string `json:"title"`
|
||||||
|
Variant *string `json:"variant"`
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := json.NewDecoder(r.Body).Decode(&alert); err != nil {
|
if err := json.NewDecoder(r.Body).Decode(&alert); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue