Skip to content

Commit 255d043

Browse files
author
Muhammad Luthfi Fahlevi
committed
feat: add id as response, replacement for uuid
1 parent 872aeda commit 255d043

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: core/user/user.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
// User is a basic entity of a user
1010
type User struct {
11-
ID string `json:"-" diff:"-" db:"id"`
11+
ID string `json:"id" diff:"-" db:"id"`
1212
Email string `json:"email" diff:"email" db:"email"`
1313
Provider string `json:"provider" diff:"-" db:"provider"`
1414
CreatedAt time.Time `json:"-" diff:"-" db:"created_at"`

Diff for: internal/server/v1beta1/user.go

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ func userToProto(u user.User) *compassv1beta1.User {
252252
return nil
253253
}
254254
return &compassv1beta1.User{
255+
Id: u.ID,
255256
Email: u.Email,
256257
}
257258
}

0 commit comments

Comments
 (0)