123456789101112131415161718192021 |
- var db = require('../db.js');
- var users = require('./users.js');
- let u = {
- username: "test",
- password: "test",
- email: "[email protected]"
- }
- users.register(u).then(console.log).
- catch((e) => {
- if(e.name === "UsernameExists"){
- console.log("Username exists register is bypassed!");
- }
- });
- users.login(u).then(console.log).
- catch((e) => {
- console.log(e);
- });
|