Remove id autogeneration from db models
Remove automatic uuid v4 ID generation from the models and replace it with `shared.NewId()`, which generates an Id depending on the config setting
This commit is contained in:
parent
412a8be600
commit
e182949a8d
9 changed files with 24 additions and 12 deletions
|
@ -129,6 +129,7 @@ func createLocalUser(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
u := dbgen.User
|
||||
query := u.Select(
|
||||
u.ID,
|
||||
u.Username,
|
||||
u.DisplayName,
|
||||
u.Description,
|
||||
|
@ -149,6 +150,7 @@ func createLocalUser(w http.ResponseWriter, r *http.Request) {
|
|||
query = query.Select(u.Location)
|
||||
}
|
||||
user := models.User{
|
||||
ID: shared.NewId(),
|
||||
Username: data.Username,
|
||||
DisplayName: data.Displayname,
|
||||
Description: data.Description,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue