Skip to content

Commit 35ad5c0

Browse files
author
Your Name
committed
typescript course ongoing
1 parent 6458512 commit 35ad5c0

File tree

5 files changed

+28
-0
lines changed

5 files changed

+28
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"ts-node": "^1.6.0"
3131
},
3232
"dependencies": {
33+
"body-parser": "^1.15.2",
3334
"express": "^4.14.0",
3435
"human-readable-ids": "^1.0.1",
3536
"lodash": "^4.16.4",

server/api/apiPatchLesson.ts

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
3+
import {Request, Response} from 'express';
4+
import * as _ from 'lodash';
5+
6+
7+
8+
9+
export function apiPatchLesson(req:Request, res:Response) {
10+
11+
12+
}

server/queries/updateLesson.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
3+
export function updateLesson(id:string, props: any) {
4+
5+
6+
}

server/server.ts

+2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import {Application} from "express";
55
import {initRestApi} from "./api/api";
66
import {apiErrorHandler} from "./api/apiErrorHandler";
77

8+
const bodyParser = require('body-parser');
89

910
const app: Application = express();
1011

12+
app.use(bodyParser.json());
1113

1214
initRestApi(app);
1315

sql/valid-lesson-post.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"url": "new-lesson-test-2",
3+
"description": "TEST LESSON",
4+
"duration": "10",
5+
"seqNo": "12",
6+
"gitHubUrl": "https://github.com/angular-university"
7+
}

0 commit comments

Comments
 (0)