Convert db backend to use Gorm, with basis for support

for Mysql and Postgres in addition to existing Sqlite
This commit is contained in:
Jamie Curnow committed 2023-05-26 11:37:39 +10:00
1 parent b4e5b8b6db
commit 29990110b1
93 files changed
+1215 -3075

No files matched your search

+1 -1
View File
@@ -93,7 +93,7 @@ func RefreshToken() func(http.ResponseWriter, *http.Request) {
// Route: POST /tokens/sse
func NewSSEToken() func(http.ResponseWriter, *http.Request) {
return func(w http.ResponseWriter, r *http.Request) {
userID := r.Context().Value(c.UserIDCtxKey).(int)
userID := r.Context().Value(c.UserIDCtxKey).(uint)
// Find user
userObj, userErr := user.GetByID(userID)