delete in the backend
This commit is contained in:
parent
f73f862bcf
commit
ba6e5a9c17
3 changed files with 22 additions and 1 deletions
|
@ -45,6 +45,10 @@ func (db *Database) CreateTask(username string, description string) Task {
|
|||
return task
|
||||
}
|
||||
|
||||
func (db *Database) DeleteTask(id string) {
|
||||
db.ORM.Delete(&Task{}, id)
|
||||
}
|
||||
|
||||
func (db *Database) CreateUser(username string, password string) error {
|
||||
user := User{Username: username, Password: password}
|
||||
result := db.ORM.Create(&user)
|
||||
|
|
Reference in a new issue