fcm/helper.go

19 lines
315 B
Go
Raw Normal View History

2021-08-09 04:26:03 +00:00
package fcm
import (
b64 "encoding/base64"
"github.com/thoas/go-funk"
)
// base64Decode ...
func base64Decode(text string) []byte {
sDec, _ := b64.StdEncoding.DecodeString(text)
return sDec
}
// isTopicAllowed ...
func isTopicAllowed(topic string) bool {
return funk.ContainsString(allowedTopics, topic)
}