mirror of
https://github.com/kaaninchen/Laterna.git
synced 2026-09-17 19:12:48 +00:00
rethought the auth system and realized that it was bullshit
This commit is contained in:
+3
-2
@@ -19,8 +19,8 @@ func IDtoInt(id string) (int, error) {
|
||||
if err != nil {
|
||||
return 0, errors.New("invalid ID format")
|
||||
}
|
||||
if idInt < 0 {
|
||||
return 0, errors.New("ID must not be negative")
|
||||
if idInt <= 0 {
|
||||
return 0, errors.New("invalid ID")
|
||||
}
|
||||
return idInt, nil
|
||||
}
|
||||
@@ -31,6 +31,7 @@ func IsValidHexColor(color string) bool {
|
||||
return match
|
||||
}
|
||||
|
||||
|
||||
func GenerateToken() (string, error) {
|
||||
bytes := make([]byte, 32)
|
||||
if _, err := rand.Read(bytes); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user