Skip to content

Commit

Permalink
Merge pull request #185 from makeopensource/fix-submissions
Browse files Browse the repository at this point in the history
fix-submissions
  • Loading branch information
RA341 authored Nov 9, 2024
2 parents 7428799 + 0dab95c commit 298e51e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion devU-api/src/entities/submission/submission.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function post(req: Request, res: Response, next: NextFunction) {
if (!req.currentUser?.userId) return res.status(400).json(new GenericResponse('Request requires auth'))

const reqSubmission = req.body

reqSubmission.userId = req.currentUser?.userId
reqSubmission.submitterIp = req.header('x-forwarded-for') || req.socket.remoteAddress
reqSubmission.submittedBy = req.currentUser?.userId

Expand Down
3 changes: 2 additions & 1 deletion devU-client/src/components/pages/webhookURLForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import RequestService from '../../services/request.service'
import { useParams } from 'react-router-dom'
import { SET_ALERT } from 'redux/types/active.types'
import { useActionless } from '../../redux/hooks'
import { apiUrl } from '../../config'

const webhookURLForm = () => {
const [webhookURL, setWebhookURL] = useState<string>()
Expand All @@ -26,7 +27,7 @@ const webhookURLForm = () => {
const handleAddURL = () => {
if (webhookURL) {
//Handle adding webhook URL to backend here
RequestService.post(`/course/${courseId}/webhooks`, {
RequestService.post(`${apiUrl}/course/${courseId}/webhooks`, {
"destinationUrl": webhookURL,
"matcherUrl": watcherUrl
}).then(
Expand Down

0 comments on commit 298e51e

Please sign in to comment.