Skip to content

Commit 20f15a4

Browse files
Merge pull request #1299 from nextstrain/james/get-available-snapshots
[charon/getAvailable] snapshots
2 parents 655c6c5 + 2232d4b commit 20f15a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/endpoints/charon/getAvailable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as authz from '../../authz/index.js';
2-
import { CommunitySource } from '../../sources/index.js';
2+
import { CommunitySource, CoreSource, NextcladeSource } from '../../sources/index.js';
33
import * as utils from '../../utils/index.js';
44
import { splitPrefixIntoParts, joinPartsIntoPrefix } from '../../utils/prefix.js';
55
import * as metaSources from '../../metaSources.js';
@@ -32,6 +32,8 @@ const getAvailable = async (req, res) => {
3232
return res.json({
3333
datasets: await Promise.all(datasets.map(async (path) => ({
3434
request: await joinPartsIntoPrefix({source, prefixParts: [path]}),
35+
// snapshots only for core & nextclade sources so far
36+
snapshots: source instanceof CoreSource || source instanceof NextcladeSource,
3537
secondTreeOptions: source.secondTreeOptions(path),
3638
buildUrl: source instanceof CommunitySource
3739
? `https://github.com/${source.repo}`

0 commit comments

Comments
 (0)