1
0

implemented binding url params directly to struct instead of passing them to the method for deleting items

This commit is contained in:
konrad
2018-07-18 08:15:38 +02:00
committed by kolaente
parent f0c003d069
commit 249128a46e
17 changed files with 48 additions and 40 deletions

View File

@ -19,8 +19,8 @@ func (t *Team) CanUpdate(user *User, id int64) bool {
}
// CanDelete checks if a user can delete a team
func (t *Team) CanDelete(user *User, id int64) bool {
t.ID = id
func (t *Team) CanDelete(user *User) bool {
//t.ID = id
return t.IsAdmin(user)
}