How to use the cosmicjs.editObject function in cosmicjs

To help you get started, we’ve selected a few cosmicjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cosmicjs / notetoself / index.js View on Github external
}).then((answers)=>{
                        var params = {
                          write_key: config.bucket.write_key,
                          slug: response.object.slug,
                          type_slug: 'notes',
                          title: answers.newText,
                          content: ''
                        }
                        Cosmic.editObject(config, params, (error, response)=>{
                          if(response.object){
                            console.log(chalk.green("\u2713" + " Success"))
                          }
                          MainMenu()
                        })
                      })

cosmicjs

The official client module for Cosmic. This module helps you easily add dynamic content to your website or application using the Cosmic headless CMS.

MIT
Latest version published 2 years ago

Package Health Score

42 / 100
Full package analysis