Skip to content

Commit 298e51e

Browse files
authored
Merge pull request #185 from makeopensource/fix-submissions
fix-submissions
2 parents 7428799 + 0dab95c commit 298e51e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

devU-api/src/entities/submission/submission.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function post(req: Request, res: Response, next: NextFunction) {
5858
if (!req.currentUser?.userId) return res.status(400).json(new GenericResponse('Request requires auth'))
5959

6060
const reqSubmission = req.body
61-
61+
reqSubmission.userId = req.currentUser?.userId
6262
reqSubmission.submitterIp = req.header('x-forwarded-for') || req.socket.remoteAddress
6363
reqSubmission.submittedBy = req.currentUser?.userId
6464

devU-client/src/components/pages/webhookURLForm.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import RequestService from '../../services/request.service'
77
import { useParams } from 'react-router-dom'
88
import { SET_ALERT } from 'redux/types/active.types'
99
import { useActionless } from '../../redux/hooks'
10+
import { apiUrl } from '../../config'
1011

1112
const webhookURLForm = () => {
1213
const [webhookURL, setWebhookURL] = useState<string>()
@@ -26,7 +27,7 @@ const webhookURLForm = () => {
2627
const handleAddURL = () => {
2728
if (webhookURL) {
2829
//Handle adding webhook URL to backend here
29-
RequestService.post(`/course/${courseId}/webhooks`, {
30+
RequestService.post(`${apiUrl}/course/${courseId}/webhooks`, {
3031
"destinationUrl": webhookURL,
3132
"matcherUrl": watcherUrl
3233
}).then(

0 commit comments

Comments
 (0)