finished login/registration

This commit is contained in:
2026-01-24 13:13:22 +11:00
parent df977ef50f
commit 73a5c9726b
13 changed files with 164 additions and 92 deletions

View File

@@ -2,6 +2,7 @@ package db
import (
"context"
"fmt"
"time"
"git.haelnorr.com/h/golib/hwsauth"
@@ -63,6 +64,7 @@ func CreateUser(ctx context.Context, tx bun.Tx, username string, discorduser *di
// GetUserByID queries the database for a user matching the given ID
// Returns nil, nil if no user is found
func GetUserByID(ctx context.Context, tx bun.Tx, id int) (*User, error) {
fmt.Printf("user id requested: %v", id)
user := new(User)
err := tx.NewSelect().
Model(user).