fix auth; update deps

This commit is contained in:
Aine
2024-07-03 12:21:47 +03:00
parent f91691bc7c
commit bf89b8fe1b
158 changed files with 356825 additions and 167987 deletions

View File

@@ -4,6 +4,7 @@ import (
"database/sql/driver"
"encoding/json"
"fmt"
"unsafe"
)
// JSON is a utility type for using arbitrary JSON data as values in database Exec and Scan calls.
@@ -29,7 +30,7 @@ func (j JSON) Value() (driver.Value, error) {
return nil, nil
}
v, err := json.Marshal(j.Data)
return string(v), err
return unsafe.String(unsafe.SliceData(v), len(v)), err
}
// JSONPtr is a convenience function for wrapping a pointer to a value in the JSON utility, but removing typed nils