Skip to content

Commit 334da53

Browse files
committed
chore: emb
1 parent bb4ee91 commit 334da53

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

server/api/datasets/[datasetid]/index.get.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ export default defineEventHandler(async (event) => {
55
const currentTime = Math.round(Date.now() / 1000);
66
const studyReleaseTimestamp = Number(config.public.STUDY_RELEASE_TIMESTAMP);
77

8+
if (
9+
currentTime < studyReleaseTimestamp &&
10+
datasetid !== "2" &&
11+
datasetid !== "1"
12+
) {
13+
throw createError({
14+
message: `Dataset ${datasetid} not found`,
15+
statusCode: 404,
16+
});
17+
}
18+
819
const publishedDataset = await prisma.published_dataset.findUnique({
920
where: {
1021
id: datasetid,

0 commit comments

Comments
 (0)