Use string instead of ID type

This commit is contained in:
2016-12-20 16:52:26 +01:00
parent 83c36f00bf
commit 7c197ff49d
5 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,5 @@
CREATE TABLE users (
id uuid,
id char(26),
email text,
name text,
password text

View File

@ -12,7 +12,7 @@ type UserService struct {
}
// User returns a user for a given id.
func (s *UserService) User(id budgeteer.ID) (*budgeteer.User, error) {
func (s *UserService) User(id string) (*budgeteer.User, error) {
u := &budgeteer.User{ID: id}
err := s.DB.Select(&u)
if err != nil {