properly scan tags from database

This commit is contained in:
Richard Bondi 2021-01-31 21:48:30 -06:00 committed by fiatjaf
parent 3dacb07b62
commit 6c6bf45c72

View File

@ -32,7 +32,7 @@ type Event struct {
type Tags []Tag
func (t Tags) Scan(src interface{}) error {
func (t *Tags) Scan(src interface{}) error {
var jtags []byte = make([]byte, 0)
switch v := src.(type) {
@ -44,7 +44,7 @@ func (t Tags) Scan(src interface{}) error {
return errors.New("couldn't scan tags, it's not a json string")
}
json.Unmarshal(jtags, t)
json.Unmarshal(jtags, &t)
return nil
}