Add default customer id

This commit is contained in:
2024-08-30 18:37:22 -05:00
parent fe06a95c98
commit 5684387bb0
16 changed files with 77 additions and 40 deletions

View File

@@ -18,8 +18,11 @@ func NewNKodeAPI(db DbAccessor) NKodeAPI {
}
}
func (n *NKodeAPI) CreateNewCustomer(nkodePolicy m.NKodePolicy) (*m.CustomerId, error) {
func (n *NKodeAPI) CreateNewCustomer(nkodePolicy m.NKodePolicy, id *m.CustomerId) (*m.CustomerId, error) {
newCustomer, err := m.NewCustomer(nkodePolicy)
if id != nil {
newCustomer.Id = *id
}
if err != nil {
return nil, err
}