implement Scylla database
This commit is contained in:
10
api/user.go
10
api/user.go
@@ -89,8 +89,8 @@ func ListUsers(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
func newUserID() string {
|
||||
return "user_" + uuid.New().String()
|
||||
func newUserID() uuid.UUID {
|
||||
return uuid.New()
|
||||
}
|
||||
|
||||
func NewUser(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -130,9 +130,9 @@ func NewUser(w http.ResponseWriter, r *http.Request) {
|
||||
type userKey struct{}
|
||||
|
||||
type User struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Password string `json:"-"`
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Password string `json:"-"`
|
||||
}
|
||||
|
||||
type UserPayload struct {
|
||||
|
Reference in New Issue
Block a user