Account stuff

This commit is contained in:
Torkel Ödegaard
2014-09-20 12:13:46 +02:00
parent cdabe50320
commit 40ff57d8c4
10 changed files with 42 additions and 24 deletions

View File

@@ -12,7 +12,7 @@ type CollaboratorLink struct {
CreatedOn time.Time
}
type UserAccount struct {
type Account struct {
Id int `gorethink:"id"`
UserName string
Login string
@@ -25,7 +25,7 @@ type UserAccount struct {
ModifiedOn time.Time
}
func (account *UserAccount) AddCollaborator(accountId int) error {
func (account *Account) AddCollaborator(accountId int) error {
for _, collaborator := range account.Collaborators {
if collaborator.AccountId == accountId {
return errors.New("Collaborator already exists")