|
|
@@ -46,9 +46,9 @@ func (simple *Simple[I]) bind(binder *binding.Binder) {
|
|
|
// 创建
|
|
|
if !options.disableCreate {
|
|
|
if !options.createNeedTx {
|
|
|
- binding.PostBind(binder, &binding.SimpleBindItem[string]{
|
|
|
+ binding.PostBind[string](binder, &binding.SimpleBindItem[string]{
|
|
|
Path: domainPath + "/create",
|
|
|
- ResponseFunc: response.SendIDResponse[string],
|
|
|
+ ResponseFunc: response.SendIDResponse,
|
|
|
RequestParams: simple.CreateJsonBody,
|
|
|
Objects: []domain.Object{simple.Entity},
|
|
|
ServiceFunc: Create(tableName, options.createCallbacks),
|
|
|
@@ -56,7 +56,7 @@ func (simple *Simple[I]) bind(binder *binding.Binder) {
|
|
|
} else {
|
|
|
binding.PostBind(binder, &binding.SimpleBindItem[string]{
|
|
|
Path: domainPath + "/create",
|
|
|
- ResponseFunc: response.SendIDResponse[string],
|
|
|
+ ResponseFunc: response.SendIDResponse,
|
|
|
RequestParams: simple.CreateJsonBody,
|
|
|
Objects: []domain.Object{simple.Entity},
|
|
|
ServiceFunc: CreateTx(tableName, options.createCallbacks),
|