Skip to content

Commit

Permalink
feat(historic): small change on pr
Browse files Browse the repository at this point in the history
  • Loading branch information
iNeoO committed Feb 10, 2025
1 parent 2b40108 commit db4eef0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/backend/src/controllers/bo-user/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const log = logger(module.filename);

module.exports = async function create(req, res, next) {
log.i("IN", req.body);
const { id } = req.decoded;
const { id: userId } = req.decoded;
let user;

try {
Expand All @@ -41,7 +41,7 @@ module.exports = async function create(req, res, next) {
)
) {
try {
await BoUser.create(user, id);
await BoUser.create(user, userId);

try {
const email = user.email;
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/services/BoUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const addAsyncUserHistoric = async (
try {
let user = null;
if (newData) {
user = newData;
user = { ...newData };
} else if (action !== actions.deletion) {
user = await getByUserIdOrEmail({ userId });
}
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/services/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const addAsyncUserHistoric = async (
try {
let user = null;
if (newData) {
user = newData;
user = { ...newData };
} else if (action !== actions.deletion && oldData !== null) {
const response = await getByUserId(userId);
[user] = response.rows;
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/services/eig.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const addAsyncEigHistoric = async (
try {
let user = null;
if (newData) {
user = newData;
user = { ...newData };
} else if (action !== actions.deletion && oldData !== null) {
const response = await getByEigId(eigId);
[user] = response.rows;
Expand Down

0 comments on commit db4eef0

Please sign in to comment.