Add ability to view source for datasets

This commit is contained in:
Dominic Ferrando
2026-07-10 14:11:42 -04:00
parent 6d4d5f83b7
commit 0d9f8d0d01
8 changed files with 333 additions and 14 deletions
+8
View File
@@ -91,4 +91,12 @@ class StandardsDatasetService {
Value.Assert(StandardsDataSchema, result.data);
return { id: result.id, name: result.name, data: result.data };
}
async update(id: string, name: string) {
const result = await db.updateTable("standards_datasets")
.set({ name })
.where("id", "=", id)
.execute();
if (result[0]?.numUpdatedRows === 0n) throw new Error(`No dataset with id "${id}"`);
}
}