MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / update

Method update

server/controllers/ProjectController.js:100–115  ·  view source on GitHub ↗
(id, data)

Source from the content-addressed store, hash-verified

98 }
99
100 update(id, data) {
101 const newFields = normalizeProjectScheduleTimezones(data);
102 return this.findById(id)
103 .then((project) => {
104 if (data.passwordProtected && !project.password) {
105 newFields.password = nanoid(8);
106 }
107 return db.Project.update(newFields, { where: { id } });
108 })
109 .then(() => {
110 return this.findById(id);
111 })
112 .catch((error) => {
113 return new Promise((resolve, reject) => reject(error));
114 });
115 }
116
117 remove(id) {
118 // remove the project and any associated items alongs with that

Callers 4

createMethod · 0.95
updateVariableMethod · 0.45
updateDashboardFilterMethod · 0.45
generateShareTokenMethod · 0.45

Calls 2

findByIdMethod · 0.95

Tested by

no test coverage detected