yjp преди 2 месеца
родител
ревизия
ba98bbbc43
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      convenient/gwtools/entity_crud/entity_crud.go

+ 6 - 0
convenient/gwtools/entity_crud/entity_crud.go

@@ -383,6 +383,12 @@ func WithGlobalMiddlewares(middlewares ...gateway.Handler) GlobalOption {
 	}
 }
 
+func WithDisableCreate() CreateOption {
+	return func(options *CreateOptions) {
+		options.disable = true
+	}
+}
+
 func WithBeforeCreateBuilderCallback(callbacks RequestBuilderCallback) CreateOption {
 	return func(options *CreateOptions) {
 		options.beforeBuilderCallback = callbacks