Showing 3 of 20 total issues
Function addContact
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addContact(): express.Router{
this.router.use(this.userAuthentication.userAuth);
this.router.post('/addContact', async (req:IRequest, res:Response) => {
const contactData = req.body as Contact;
UserModel.findOne({
Function userSignUp
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
userSignUp(): express.Router{
this.router.post('/registerUser', async (req, res) => {
const userData = req.body as User;
UserModel.findOne({
phone_number: userData.phone_number
Function deleteContact
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
deleteContact(): express.Router{
this.router.use(this.userAuthentication.userAuth);
this.router.delete('/deleteContact/:phone_number', async (req:IRequest, res:Response) => {
const contact = req.user.contacts.find(contact => contact.contact_phone_number === req.params.phone_number);
if(!contact){