change user type from int to uuid string
This commit is contained in:
10
api/user.go
10
api/user.go
@@ -1,7 +1,15 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
func newUserID() string {
|
||||
return "user_" + uuid.New().String()
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID int64 `json:"id"`
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user