This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { describe, it } from 'mocha'; | |
import chai, { expect } from 'chai'; | |
import chaiHttp from 'chai-http'; | |
import app from '../../../index'; | |
import model from '../../models'; | |
chai.use(chaiHttp); | |
const { User } = model; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import model from '../models'; | |
import passwordManager from '../helpers/PasswordManager'; | |
import tokenManager from '../helpers/TokenManager'; | |
const { User } = model; | |
/** | |
* @class userController | |
* @description contains the methods used to carry out operations on a user | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bcrypt from 'bcrypt'; | |
/** | |
* @class passwordManager | |
* @description class defines the methods used to hash and compare hashed passswords. | |
*/ | |
class PasswordManager { | |
/** | |
* @static | |
* @param {string} password to be hashed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwt from 'jsonwebtoken'; | |
import dotenv from 'dotenv'; | |
dotenv.config(); | |
/** | |
* @class tokenManager | |
* @description tokenManager class methods | |
*/ | |
class tokenManager { | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import { InputField } from './components/InputField'; | |
class App extends Component { | |
constructor(props, context) { | |
super(props, context); | |
this.state = { | |
value: '', |
NewerOlder