Some basic shell

This commit is contained in:
Robert Hall
2018-09-22 15:06:36 -06:00
parent 0831388c62
commit d97a4693e1
6 changed files with 157 additions and 8 deletions

23
app/auth/db.js Normal file
View File

@@ -0,0 +1,23 @@
// WARNING: THIS HELPER FILE IS NOT GOOD PRACTICE AND ONLY HERE FOR CONVENIENCE
// use a real database for persisting users instead
// const Users = [{
// username: 'general-zod',
// email: 'general.zod@krypton.com',
// hash: '',
// }, {
// username: 'kal-el',
// email: 'kal-el@krypton.com',
// hash: '',
// }];
const Users = [];
export default {
find(key, value) {
return Users.find(user => user[key] === value);
},
add(user) {
Users.push(user);
return user;
},
};