Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const createNotebook = async (user = defaultUser) => {
const notebook = new DbNotebook({
id: uuid(),
owner: user,
name: 'new name',
} as any);
return notebookRepo.save(notebook);
};
function createNotebook(defaultUser: string, notebookName = 'New notebook') {
const notebook = new DbNotebook();
notebook.id = uuid();
notebook.owner = defaultUser;
notebook.name = notebookName;
return notebook;
}