Toggle navigation
Toggle navigation
This project
Loading...
Sign in
khusat
/
khusat-server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박기홍
2020-11-14 01:46:37 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7f4bcc21f3a1cb06807656a1e21532f47eee9899
7f4bcc21
1 parent
157071e2
job db updated
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
15 deletions
khusat_DB/job_db.xlsx
src/models/jobs.js
src/models/questions.js
src/router/index.js
khusat_DB/job_db.xlsx
View file @
7f4bcc2
No preview for this file type
src/models/jobs.js
View file @
7f4bcc2
...
...
@@ -15,10 +15,6 @@ const jobSchema = new schema({
type
:
String
,
default
:
"대분류를 입력하세요"
,
},
middle
:{
type
:
String
,
default
:
"중분류를 입력하세요"
,
},
low
:{
type
:
String
,
default
:
"소분류를 입력하세요"
,
...
...
src/models/questions.js
View file @
7f4bcc2
...
...
@@ -7,7 +7,7 @@ const questionSchema = new schema({
* 번호 질문내용 답1 답2 가중치1, 가중치2
*/
questionN
um
:{
n
um
:{
type
:
Number
,
default
:
-
1
},
...
...
@@ -23,27 +23,27 @@ const questionSchema = new schema({
type
:
String
,
default
:
"아니다"
},
fit
:
{
fi
gh
t
:
{
type
:
Number
,
default
:
0
,
},
d
t
l
:
{
d
etai
l
:
{
type
:
Number
,
default
:
0
,
},
tr
f
:
{
tr
affic
:
{
type
:
Number
,
default
:
0
,
},
c
tr
:
{
c
ontrol
:
{
type
:
Number
,
default
:
0
,
},
sup
:
{
sup
port
:
{
type
:
Number
,
default
:
0
,
},
act
:
{
act
ivity
:
{
type
:
Number
,
default
:
0
,
},
...
...
src/router/index.js
View file @
7f4bcc2
...
...
@@ -71,15 +71,34 @@ module.exports = function(app)
app
.
post
(
'/addJobs'
,
async
(
req
,
res
,
next
)
=>
{
// 보직 추가하는 api
const
datas
=
req
.
body
;
});
app
.
post
(
'/addQuestions'
,
async
(
req
,
res
,
next
)
=>
{
// 질문 추가하는 api
const
datas
=
req
.
body
;
console
.
log
(
datas
);
console
.
log
(
typeof
(
datas
));
for
(
let
i
=
0
;
i
<
datas
.
length
;
i
++
){
const
data
=
new
Question
();
data
.
num
=
datas
[
i
].
num
;
data
.
question
=
datas
[
i
].
question
;
data
.
answer1
=
datas
[
i
].
answer1
;
data
.
answer2
=
datas
[
i
].
answer2
;
data
.
fight
=
datas
[
i
].
fight
;
data
.
detail
=
datas
[
i
].
detail
;
data
.
traffic
=
datas
[
i
].
traffic
;
data
.
control
=
datas
[
i
].
control
;
data
.
support
=
datas
[
i
].
support
;
data
.
activity
=
datas
[
i
].
activity
;
console
.
log
(
data
);
await
data
.
save
();
}
});
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment