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

Method findById

server/controllers/TeamController.js:318–336  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

316 }
317
318 findById(id) {
319 return db.Team.findOne({
320 where: { id },
321 include: [
322 { model: db.TeamRole },
323 {
324 model: db.Project,
325 include: [{ model: db.Chart, attributes: ["id"] }],
326 }
327 ],
328 })
329 .then((team) => {
330 if (!team) return new Promise((resolve, reject) => reject(new Error(404)));
331
332 return team;
333 }).catch((error) => {
334 return new Promise((resolve, reject) => reject(error.message));
335 });
336 }
337
338 update(id, data) {
339 return db.Team.update(data, { where: { "id": id } })

Callers 15

updateMethod · 0.95
getOAuthFunction · 0.45
checkPublicAccessFunction · 0.45
checkPermissionsFunction · 0.45
checkFilterAccessFunction · 0.45
ChartRoute.jsFile · 0.45
TemplateRoute.jsFile · 0.45
TeamRoute.jsFile · 0.45
checkPermissionsFunction · 0.45
ProjectRoute.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected