Skip to content

Commit

Permalink
Merge pull request #60 from sikka-software/feature/enhance-hajar-usab…
Browse files Browse the repository at this point in the history
…ility-js

Feature/enhance hajar usability js
  • Loading branch information
Mansourkira authored Mar 20, 2024
2 parents 830f55b + 54096d0 commit 939f0cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sikka/hajar",
"version": "1.1.70",
"version": "1.1.71",
"description": "Toolkit to create SaaS applications",
"author": "Sikka Software <[email protected]> (http://sikka.io)",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions www/src/@sikka/hajar/core/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ async function login(config, email, password) {
let clientData = null;

if (ref === "admin") {
adminData = await models.Admin.findOne({ userId: user._id });
adminData = await models.Admin.findOne({ uid: user._id });
if (!adminData) {
throw new Error("Admin not found");
}
} else if (ref === "client") {
clientData = await models.Client.findOne({ userId: user._id });
clientData = await models.Client.findOne({ uid: user._id });
if (!clientData) {
throw new Error("Client not found");
}
Expand Down
1 change: 0 additions & 1 deletion www/src/@sikka/hajar/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class Hajar {
mongoose: mongooseInstance,
};
this.initialized = true;

console.log("Hajar initialized successfully.");
}
}
Expand Down

0 comments on commit 939f0cb

Please sign in to comment.