Showing
1 changed file
with
3 additions
and
3 deletions
1 | -const Profile = require("../../models/profile"); | 1 | +const User = require("../../models/user"); |
2 | const sendSlack = require("../../util/sendSlack"); | 2 | const sendSlack = require("../../util/sendSlack"); |
3 | const problem_set = require("../../data/problem_set"); | 3 | const problem_set = require("../../data/problem_set"); |
4 | const compareBJ = require("../../util/compareBJ"); | 4 | const compareBJ = require("../../util/compareBJ"); |
... | @@ -12,7 +12,7 @@ exports.slackGoal = async (ctx) => { | ... | @@ -12,7 +12,7 @@ exports.slackGoal = async (ctx) => { |
12 | try { | 12 | try { |
13 | const { username } = ctx.request.body; | 13 | const { username } = ctx.request.body; |
14 | 14 | ||
15 | - const profile = await Profile.findByUsername(username); | 15 | + const profile = await User.findByUsername(username); |
16 | if (!profile) { | 16 | if (!profile) { |
17 | ctx.status = 401; | 17 | ctx.status = 401; |
18 | return; | 18 | return; |
... | @@ -62,7 +62,7 @@ exports.slackRecommend = async (ctx) => { | ... | @@ -62,7 +62,7 @@ exports.slackRecommend = async (ctx) => { |
62 | console.log("1"); | 62 | console.log("1"); |
63 | const { username } = ctx.request.body; | 63 | const { username } = ctx.request.body; |
64 | 64 | ||
65 | - const profile = await Profile.findByUsername(username); | 65 | + const profile = await User.findByUsername(username); |
66 | if (!profile) { | 66 | if (!profile) { |
67 | ctx.status = 401; | 67 | ctx.status = 401; |
68 | return; | 68 | return; | ... | ... |
-
Mentioned in commit 0599acbe
-
Please register or login to post a comment