This commit is contained in:
parent
99cec81d91
commit
29d2069bb1
@ -6,12 +6,11 @@ import (
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
func (tm *TaskManagerRepository) AddProject(newProject *project.UserProjectLink) error {
|
||||
func (tm *TaskManagerRepository) AddProject(newProject *project.Project) error {
|
||||
err := tm.db.QueryRow(`INSERT INTO task_manager.project(name,description)
|
||||
VALUES ($1,$2)
|
||||
RETURNING id
|
||||
`, newProject.Name, newProject.Description).Scan(&newProject.Id)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user