1
0

Integration tests (#71)

This commit is contained in:
konrad
2019-04-21 18:18:17 +00:00
committed by Gitea
parent 46efcb1005
commit 3872d1d8a7
69 changed files with 3924 additions and 136 deletions

View File

@ -24,11 +24,6 @@ import (
// CreateOrUpdateList updates a list or creates it if it doesn't exist
func CreateOrUpdateList(list *List) (err error) {
// Check we have at least a title
if list.Title == "" {
return ErrListTitleCannotBeEmpty{}
}
// Check if the namespace exists
if list.NamespaceID != 0 {
_, err = GetNamespaceByID(list.NamespaceID)
@ -73,11 +68,6 @@ func CreateOrUpdateList(list *List) (err error) {
// @Failure 500 {object} models.Message "Internal error"
// @Router /lists/{id} [post]
func (l *List) Update() (err error) {
// Check if it exists
lorig := List{ID: l.ID}
if err = lorig.GetSimpleByID(); err != nil {
return
}
return CreateOrUpdateList(l)
}