chore: did some clean up

This commit is contained in:
2024-04-13 23:55:01 +01:00
parent 4862e9a79e
commit fbf7eb9271
5 changed files with 148 additions and 345 deletions

View File

@@ -7,15 +7,16 @@ import (
type UserType int
const (
User_Normal UserType = iota + 1
User_Admin
const (
User_Not_Auth UserType = iota
User_Normal
User_Admin
)
type User struct {
Id string
Username string
Email string
Id string
Username string
Email string
UserType int
}
@@ -26,7 +27,7 @@ func UserFromToken(db *sql.DB, token string) (*User, error) {
if err != nil {
return nil, err
}
defer rows.Close()
defer rows.Close()
var id string
var username string