- keep store.id when CreateStore.
This commit is contained in:
@@ -211,7 +211,9 @@ func UpdateStore(storeID int, payload map[string]interface{}, userName string) (
|
||||
}
|
||||
|
||||
func CreateStore(store *model.Store, userName string) (id int, err error) {
|
||||
existingID := store.ID
|
||||
dao.WrapAddIDCULDEntity(store, userName)
|
||||
store.ID = existingID
|
||||
if err = dao.CreateEntity(nil, store); err == nil {
|
||||
return store.ID, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user