Added completed user. Some fixes and more more more...
This commit is contained in:
parent
b96dd39795
commit
ea8ab7c0ed
33 changed files with 576 additions and 212 deletions
|
|
@ -20,7 +20,9 @@ func CreateUserRepository(conn *db.Database) UserRepository {
|
|||
}
|
||||
|
||||
func (r *UserRepository) Create(entity *entities.User) (*entities.User, error) {
|
||||
query := "INSERT INTO " + entities.UserTable + "(id, username, password) VALUES (:id, :username, :password)"
|
||||
query := "INSERT INTO " + entities.UserTable +
|
||||
"(id, username, password, name, role, speciality, description, skills, avatar, joindate, projects, motto) " +
|
||||
"VALUES (:id, :username, :password, :name, :role, :speciality, :description, :skills, :avatar, :joindate, :projects, :motto)"
|
||||
_, err := r.conn.Conn.NamedExec(query, entity)
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue