Commit b3b07c6c authored by nanahira's avatar nanahira

solved

parent 13105d63
...@@ -17,23 +17,23 @@ ...@@ -17,23 +17,23 @@
## 项目经历 ## 项目经历
{{#projects}} {{#projects}}
* {{.name}} * {{name}}
{{/projects}} {{/projects}}
## 论文 ## 论文
{{#theses}} {{#theses}}
* {{.name}} * {{name}}
{{/theses}} {{/theses}}
## 专利 ## 专利
{{#patents}} {{#patents}}
* {{.name}} * {{name}}
{{/patents}} {{/patents}}
## 竞赛 ## 竞赛
{{#competitions}} {{#competitions}}
* {{.name}} * {{name}}
{{/competitions}} {{/competitions}}
\ No newline at end of file
...@@ -12,9 +12,12 @@ export class AppController { ...@@ -12,9 +12,12 @@ export class AppController {
try { try {
data = JSON.parse(dataRaw); data = JSON.parse(dataRaw);
} catch (e) { } catch (e) {
res.status(400).end('bad JSON'); res.status(400).end({ message: 'bad JSON' });
return; return;
} }
if (!data || !data.id || !data.name) {
res.status(400).end({ message: 'bad student data' });
}
const pdf = await this.appService.getPdf(data); const pdf = await this.appService.getPdf(data);
res.set({ res.set({
'Content-Type': 'application/pdf', 'Content-Type': 'application/pdf',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment