node-asana icon indicating copy to clipboard operation
node-asana copied to clipboard

Project Templates missing

Open adshrc opened this issue 3 years ago • 1 comments

Hi,

i just realized that in the current version (1.0.0) ProjectTemplates is not exported properly. It's not possible to access it through the client, but there is a project_templates.js. Looks like someone forgot to add it to the index.js file.

Currently it is not usable.

adshrc avatar Jul 20 '22 06:07 adshrc

In case somebody is searching for a workaround:

const path = "/project_templates/{project_template_gid}/instantiateProject".replace("{project_template_gid}", projectTemplateGid);

asanaClient.dispatcher.post(path, data)
          .then((projectRes: any) => {
            return resolve(projectRes);
          })
          .catch((err: any) => {
            console.log(err.value.errors);
            reject(err);
          })

adshrc avatar Jul 20 '22 07:07 adshrc