Add ability to view source for datasets
This commit is contained in:
@@ -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}"`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user