Skip to content

Commit 18b725a

Browse files
committed
feat: Add charts api for v2
Ref: HDX-1239
1 parent b51e39c commit 18b725a

File tree

7 files changed

+1206
-106
lines changed

7 files changed

+1206
-106
lines changed

packages/api/src/controllers/sources.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ export function getSources(team: string) {
44
return Source.find({ team });
55
}
66

7+
export function getSource(team: string, sourceId: string) {
8+
return Source.findOne({ _id: sourceId, team });
9+
}
10+
711
export function createSource(team: string, source: Omit<ISource, 'id'>) {
812
return Source.create({ ...source, team });
913
}

0 commit comments

Comments
 (0)