Skip to content

Commit 24bf0f7

Browse files
committed
Merge remote-tracking branch 'origin/staging' into staging
2 parents bd6503c + 1a15a3b commit 24bf0f7

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

server/api/dev/index.post.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,46 +17,46 @@ export default defineEventHandler(async (_event) => {
1717
});
1818
}
1919

20-
// throw createError({
21-
// statusCode: 500,
22-
// statusMessage: "This function is disabled",
23-
// });
20+
throw createError({
21+
statusCode: 500,
22+
statusMessage: "This function is disabled",
23+
});
2424

2525
/**
2626
* ! disabling the update operation
2727
*/
2828

29-
const updatedRecord = await prisma.published_dataset.update({
30-
data: {
31-
title: DatasetRecord.title,
32-
data: DatasetRecord.data,
33-
dataset_id: DatasetRecord.dataset_id,
34-
description: DatasetRecord.description,
35-
doi: DatasetRecord.doi,
36-
files: DatasetRecord.files,
37-
published_metadata: DatasetRecord.published_metadata,
38-
study_id: DatasetRecord.study_id,
39-
study_title: DatasetRecord.study_title,
40-
version_id: DatasetRecord.version_id,
41-
version_title: DatasetRecord.version_title,
42-
},
43-
where: {
44-
id: "2",
45-
},
46-
});
29+
// const updatedRecord = await prisma.published_dataset.update({
30+
// data: {
31+
// title: DatasetRecord.title,
32+
// data: DatasetRecord.data,
33+
// dataset_id: DatasetRecord.dataset_id,
34+
// description: DatasetRecord.description,
35+
// doi: DatasetRecord.doi,
36+
// files: DatasetRecord.files,
37+
// published_metadata: DatasetRecord.published_metadata,
38+
// study_id: DatasetRecord.study_id,
39+
// study_title: DatasetRecord.study_title,
40+
// version_id: DatasetRecord.version_id,
41+
// version_title: DatasetRecord.version_title,
42+
// },
43+
// where: {
44+
// id: "2",
45+
// },
46+
// });
4747

48-
if (!updatedRecord) {
49-
console.log("No record updated, exiting function");
50-
throw createError({
51-
statusCode: 500,
52-
statusMessage: "No record updated",
53-
});
54-
}
48+
// if (!updatedRecord) {
49+
// console.log("No record updated, exiting function");
50+
// throw createError({
51+
// statusCode: 500,
52+
// statusMessage: "No record updated",
53+
// });
54+
// }
5555

56-
console.log("Updated record", updatedRecord);
56+
// console.log("Updated record", updatedRecord);
5757

58-
return {
59-
message: "Updated record",
60-
statusCode: 200,
61-
};
58+
// return {
59+
// message: "Updated record",
60+
// statusCode: 200,
61+
// };
6262
});

0 commit comments

Comments
 (0)