Skip to content

Commit 41c0d4d

Browse files
author
Gabe Ruttner
committed
removed excersie code
1 parent e4ff9f7 commit 41c0d4d

File tree

4 files changed

+42
-12
lines changed

4 files changed

+42
-12
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Specifies intentionally untracked files to ignore when using Git
2+
# http://git-scm.com/docs/gitignore
3+
4+
*~
5+
*.sw[mnpcod]
6+
*.log
7+
*.tmp
8+
*.tmp.*
9+
log.txt
10+
*.sublime-project
11+
*.sublime-workspace
12+
.vscode/
13+
npm-debug.log*
14+
15+
.idea/
16+
.ionic/
17+
.sourcemaps/
18+
.sass-cache/
19+
.tmp/
20+
.versions/
21+
coverage/
22+
www/
23+
node_modules/
24+
tmp/
25+
temp/
26+
platforms/
27+
plugins/
28+
plugins/android.json
29+
plugins/ios.json
30+
$RECYCLE.BIN/
31+
32+
.DS_Store
33+
Thumbs.db
34+
UserInterfaceState.xcuserstate
35+
node_modules
36+
venv/
37+
.vscode

course-02/exercises/udacity-c2-restapi/src/controllers/v0/feed/routes/feed.router.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@ router.get('/', async (req: Request, res: Response) => {
1616
res.send(items);
1717
});
1818

19-
// Get a specific resource
20-
router.get('/:id',
21-
async (req: Request, res: Response) => {
22-
let { id } = req.params;
23-
const item = await FeedItem.findByPk(id);
24-
res.send(item);
25-
});
19+
//@TODO
20+
//Add an endpoint to GET a specific resource by Primary Key
2621

2722
// update a specific resource
2823
router.patch('/:id',

course-02/exercises/udacity-c2-restapi/src/controllers/v0/users/routes/auth.router.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,15 @@ import * as EmailValidator from 'email-validator';
1111
const router: Router = Router();
1212

1313
async function generatePassword(plainTextPassword: string): Promise<string> {
14-
const saltRounds = 10;
15-
let salt = await bcrypt.genSalt(saltRounds);
16-
return await bcrypt.hash(plainTextPassword, salt);
14+
//@TODO Use Bcrypt to Generated Salted Hashed Passwords
1715
}
1816

1917
async function comparePasswords(plainTextPassword: string, hash: string): Promise<boolean> {
20-
return await bcrypt.compare(plainTextPassword, hash);
18+
//@TODO Use Bcrypt to Compare your password to your Salted Hashed Password
2119
}
2220

2321
function generateJWT(user: User): string {
24-
return jwt.sign(user.short(), "hello")
22+
//@TODO Use jwt to create a new JWT Payload containing
2523
}
2624

2725
export function requireAuth(req: Request, res: Response, next: NextFunction) {

0 commit comments

Comments
 (0)