Delete species
This commit is contained in:
parent
50bee9ab88
commit
20026ebfd9
4 changed files with 13 additions and 2 deletions
|
@ -155,3 +155,13 @@ func (s SpeciesService) Create(e *types.Entity, genus string, claims *types.Clai
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Delete deletes a single species
|
||||
func (s SpeciesService) Delete(id int64, genus string, claims *types.Claims) *types.AppError {
|
||||
q := `DELETE FROM species WHERE id=$1;`
|
||||
// TODO: fix this
|
||||
if _, err := models.DBH.Exec(q, id); err != nil {
|
||||
return newJSONError(err, http.StatusInternalServerError)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Reference in a new issue