mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Merge branch 'main' of https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir into fuhrmanator/issue79
This commit is contained in:
commit
9091a1a44f
2 changed files with 4 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ class Folders {
|
||||||
|
|
||||||
const existingFolder = await foldersCollection.findOne({ title: title, userId: userId });
|
const existingFolder = await foldersCollection.findOne({ title: title, userId: userId });
|
||||||
|
|
||||||
if (existingFolder) return null;
|
if (existingFolder) return new Error('Folder already exists');
|
||||||
|
|
||||||
const newFolder = {
|
const newFolder = {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ class Users {
|
||||||
await userCollection.insertOne(newUser);
|
await userCollection.insertOne(newUser);
|
||||||
|
|
||||||
const folderTitle = 'Dossier par Défaut';
|
const folderTitle = 'Dossier par Défaut';
|
||||||
const userId = newUser._id;
|
const userId = newUser._id.toString();
|
||||||
await Folders.create(folderTitle, userId);
|
await Folders.create(folderTitle, userId);
|
||||||
|
|
||||||
// TODO: verif if inserted properly...
|
// TODO: verif if inserted properly...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue