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
JuWon Seo
2020-08-25 16:56:29 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2020-08-25 16:56:29 +0900
Commit
16421cc11f19f69ebdca6781c2862c94fca8303e
16421cc1
2 parents
e2fcb1ac
50f9d78b
Merge pull request #16 from FacerAin/feature/rest_api
Feature/rest api
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
jaksimsamil-server/src/api/notify/slack.ctrl.js
jaksimsamil-server/src/api/notify/slack.ctrl.js
View file @
16421cc
const
Profile
=
require
(
"../../models/profile
"
);
const
User
=
require
(
"../../models/user
"
);
const
sendSlack
=
require
(
"../../util/sendSlack"
);
const
problem_set
=
require
(
"../../data/problem_set"
);
const
compareBJ
=
require
(
"../../util/compareBJ"
);
...
...
@@ -12,7 +12,7 @@ exports.slackGoal = async (ctx) => {
try
{
const
{
username
}
=
ctx
.
request
.
body
;
const
profile
=
await
Profile
.
findByUsername
(
username
);
const
profile
=
await
User
.
findByUsername
(
username
);
if
(
!
profile
)
{
ctx
.
status
=
401
;
return
;
...
...
@@ -62,7 +62,7 @@ exports.slackRecommend = async (ctx) => {
console
.
log
(
"1"
);
const
{
username
}
=
ctx
.
request
.
body
;
const
profile
=
await
Profile
.
findByUsername
(
username
);
const
profile
=
await
User
.
findByUsername
(
username
);
if
(
!
profile
)
{
ctx
.
status
=
401
;
return
;
...
...
Please
register
or
login
to post a comment