Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
arbitrium
api
Commits
acb277b8
Commit
acb277b8
authored
6 years ago
by
Matheus Vaccaro
Browse files
Options
Download
Email Patches
Plain Diff
011 working POST/interviews
parent
47130f71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/interview.js
+3
-2
app/controllers/interview.js
with
3 additions
and
2 deletions
+3
-2
app/controllers/interview.js
View file @
acb277b8
var
db
=
require
(
'
../models/index.js
'
);
var
InterviewModel
=
require
(
'
../models/interview.js
'
)(
db
.
sequelize
,
db
.
Sequelize
);
var
ScheduleModel
=
require
(
'
../models/schedule.js
'
)(
db
.
sequelize
,
db
.
Sequelize
);
var
ResultModel
=
require
(
'
../models/
sched
ul
e
.js
'
)(
db
.
sequelize
,
db
.
Sequelize
);
var
ResultModel
=
require
(
'
../models/
res
ul
t
.js
'
)(
db
.
sequelize
,
db
.
Sequelize
);
exports
.
create
=
async
function
(
req
,
res
)
{
// Will be used to storage the return of interview save
...
...
@@ -18,7 +18,8 @@ exports.create = async function(req, res) {
try
{
// Create interview model and save the interview record on database
var
interview
=
new
InterviewModel
({
researcher_id
:
req
.
body
.
researcher_id
});
var
interview
=
new
InterviewModel
({
researcher_id
:
req
.
body
.
researcher_id
,
initial_date
:
req
.
body
.
initial_date
,
conclusion_date
:
req
.
body
.
conclusion_date
});
interviewResult
=
await
interview
.
save
();
// Take the auto generated ID of interview and save the of schedule record on database
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help