Toggle navigation
Toggle navigation
This project
Loading...
Sign in
송용우
/
oss-Jaksimsamil
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
JJuOn
2020-08-31 16:00:15 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
910ff91fc5f21e7ddbe249a376d05f0ab6267ef8
910ff91f
1 parent
0307dce8
Add new routes
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
jaksimsamil-server/src/api/index.js
jaksimsamil-server/src/api/session/index.js
jaksimsamil-server/src/api/session/session.ctrl.js
jaksimsamil-server/src/api/index.js
View file @
910ff91
...
...
@@ -7,6 +7,7 @@ const notify = require("./notify");
const
user
=
require
(
"./user"
);
const
profile
=
require
(
"./profile"
);
const
challenge
=
require
(
"./challenge"
);
const
session
=
require
(
"./session"
);
api
.
use
(
"/auth"
,
auth
.
routes
());
api
.
use
(
"/friend"
,
friend
.
routes
());
...
...
@@ -14,5 +15,6 @@ api.use("/notify", notify.routes());
api
.
use
(
"/user"
,
user
.
routes
());
api
.
use
(
"/profile"
,
profile
.
routes
());
api
.
use
(
"/challenge"
,
challenge
.
routes
());
api
.
use
(
"/session"
,
session
.
routes
());
module
.
exports
=
api
;
...
...
jaksimsamil-server/src/api/session/index.js
0 → 100644
View file @
910ff91
const
Router
=
require
(
'koa-router'
);
const
session
=
new
Router
();
const
sessionCtrl
=
require
(
'./session.ctrl'
);
session
.
post
(
"/createproblem/:how"
,
sessionCtrl
.
createProblem
);
module
.
exports
=
session
;
\ No newline at end of file
jaksimsamil-server/src/api/session/session.ctrl.js
0 → 100644
View file @
910ff91
/* POST /api/session/createproblem/:how
{
problemList:[Number]
}
*/
exports
.
createProblem
=
async
(
ctx
)
=>
{
try
{
const
how
=
ctx
.
params
.
how
;
if
(
how
===
'self'
){
}
else
if
(
how
===
'recommend'
){
}
}
catch
(
e
){
ctx
.
throw
(
500
,
e
);
}
};
\ No newline at end of file
Please
register
or
login
to post a comment