implemented binding url params directly to struct instead of passing them to the method for deleting items
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user