Merge pull request #92 from safing/fix/api-cancel

Fix subscription cancellation via API
This commit is contained in:
Patrick Pacher 2020-10-15 11:35:40 +02:00 committed by GitHub
commit 5568ef5ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,7 +146,7 @@ func (api *DatabaseAPI) handler() {
parts := bytes.SplitN(msg, []byte("|"), 3)
// Handle special command "cancel"
if len(parts) == 2 && string(parts[1]) != "cancel" {
if len(parts) == 2 && string(parts[1]) == "cancel" {
// 125|cancel
// 127|cancel
go api.handleCancel(parts[0])