Skip to content

Commit

Permalink
Merge pull request #14 from philippebeck/dev
Browse files Browse the repository at this point in the history
Release 0.2.5-alpha
  • Loading branch information
philippebeck authored Dec 18, 2023
2 parents 42d7402 + 11df65a commit 08978e0
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 159 deletions.
2 changes: 2 additions & 0 deletions controller/AuthCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const form = formidable();
const recaptcha = new Recaptcha({ secret: process.env.RECAPTCHA_SECRET });
const User = db.user;

//! ******************** PUBLIC ********************

/**
* ? READ AVATAR
* * Retrieves the avatar information for a specific user.
Expand Down
2 changes: 1 addition & 1 deletion controller/ImageCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,5 @@ exports.deleteImage = (req, res) => {
})
})
})
.catch(() => res.status(400).json({ message: IMAGE_NOT_FOUND }));
.catch(() => res.status(404).json({ message: IMAGE_NOT_FOUND }));
};
4 changes: 3 additions & 1 deletion controller/UserCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,9 @@ exports.listUsers = (req, res) => {
name: user.name,
email: user.email,
image: user.image,
role: user.role
role: user.role,
createdAt: user.createdAt,
updatedAt: user.updatedAt
};
usersList.push(userSafe);
}
Expand Down
3 changes: 1 addition & 2 deletions model/ImageModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ module.exports = (Sequelize, DataTypes) => {
}
}, {
tableName: "Images",
timestamps: false,
underscored: true
timestamps: false
});

return ImageModel;
Expand Down
3 changes: 1 addition & 2 deletions model/OrderModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ module.exports = (Sequelize, DataTypes) => {
},
},
}, {
tableName: "Orders",
underscored: true
tableName: "Orders"
});

return OrderModel;
Expand Down
3 changes: 1 addition & 2 deletions model/UserModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ module.exports = (Sequelize, DataTypes) => {
allowNull: false
},
}, {
tableName: "Users",
timestamps: false
tableName: "Users"
});

return UserModel;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nens",
"version": "0.2.4-alpha",
"version": "0.2.5-alpha",
"description": "API with Node, Express, NemJS & SQL",
"keywords": [
"api",
Expand Down
Loading

0 comments on commit 08978e0

Please sign in to comment.