1
0

Refactor GetUser & GetUserByID

This commit is contained in:
konrad
2018-08-30 19:14:02 +02:00
committed by kolaente
parent aeb1521cc4
commit 478c98fb8d
26 changed files with 69 additions and 75 deletions

View File

@ -23,7 +23,7 @@ func (Namespace) TableName() string {
// AfterLoad gets the owner
func (n *Namespace) AfterLoad() {
n.Owner, _, _ = GetUserByID(n.OwnerID)
n.Owner, _ = GetUserByID(n.OwnerID)
}
// GetNamespaceByID returns a namespace object by its ID
@ -39,7 +39,7 @@ func GetNamespaceByID(id int64) (namespace Namespace, err error) {
}
// Get the namespace Owner
namespace.Owner, _, err = GetUserByID(namespace.OwnerID)
namespace.Owner, err = GetUserByID(namespace.OwnerID)
if err != nil {
return namespace, err
}