MCPcopy
hub / github.com/larksuite/cli / buildBaseCreateBody

Function buildBaseCreateBody

shortcuts/base/base_ops.go:143–152  ·  view source on GitHub ↗
(runtime *common.RuntimeContext)

Source from the content-addressed store, hash-verified

141}
142
143func buildBaseCreateBody(runtime *common.RuntimeContext) map[string]interface{} {
144 body := map[string]interface{}{"name": runtime.Str("name")}
145 if folderToken := strings.TrimSpace(runtime.Str("folder-token")); folderToken != "" {
146 body["folder_token"] = folderToken
147 }
148 if timeZone := strings.TrimSpace(runtime.Str("time-zone")); timeZone != "" {
149 body["time_zone"] = timeZone
150 }
151 return body
152}
153
154func augmentBasePermissionGrant(runtime *common.RuntimeContext, out, base map[string]interface{}) {
155 if grant := common.AutoGrantCurrentUserDrivePermission(runtime, extractBasePermissionToken(base), "bitable"); grant != nil {

Callers 2

dryRunBaseCreateFunction · 0.85
executeBaseCreateFunction · 0.85

Calls 1

StrMethod · 0.65

Tested by

no test coverage detected