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

Method findById

server/controllers/ProjectController.js:28–59  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

26 }
27
28 findById(id) {
29 return db.Project.findOne({
30 where: { id },
31 order: [[db.Chart, "dashboardOrder", "ASC"], [db.Chart, db.ChartDatasetConfig, "order", "ASC"]],
32 include: [
33 {
34 model: db.Chart,
35 include: [{
36 model: db.ChartDatasetConfig, include: [{ model: db.Dataset }]
37 }, {
38 model: db.Chartshare,
39 }, {
40 model: db.Alert,
41 }],
42 },
43 {
44 model: db.Variable,
45 },
46 {
47 model: db.Team,
48 attributes: ["showBranding", "allowReportExport", "allowReportRefresh"],
49 }, {
50 model: db.DashboardFilter,
51 }, {
52 model: db.SharePolicy,
53 }
54 ],
55 })
56 .catch((error) => {
57 return new Promise((resolve, reject) => reject(error));
58 });
59 }
60
61 create(userId, data, options = {}) {
62 let newProject = {};

Callers 6

createMethod · 0.95
updateMethod · 0.95
generateTemplateMethod · 0.95
updateVariableMethod · 0.95
takeSnapshotMethod · 0.95
generateShareTokenMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected