Skip to content

Commit

Permalink
[Feedback] Acually make the success message work
Browse files Browse the repository at this point in the history
  • Loading branch information
rikurauhala committed Nov 12, 2024
1 parent 2ab3dbf commit 44f4037
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions services/backend/src/routes/feedback.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Request, Router } from 'express'
import { Request, Response, Router } from 'express'

import { sendFeedbackToToska } from '../services/mailService'
import { ApplicationError } from '../util/customErrors'
Expand All @@ -12,7 +12,7 @@ interface EmailRequest extends Request {
}
}

router.post('/email', async (req: EmailRequest) => {
router.post('/email', async (req: EmailRequest, res: Response) => {
const { content } = req.body
const { user } = req

Expand All @@ -26,6 +26,7 @@ router.post('/email', async (req: EmailRequest) => {
})

logger.info(`${user.userId} succesfully sent feedback to Toska`)
return res.status(200).end()
})

export default router
2 changes: 1 addition & 1 deletion services/frontend/src/pages/Feedback/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const Feedback = () => {
}}
width="100%"
>
<Typography component="h3" mb={2} variant="h6">
<Typography mb={2} variant="h6">
Sending feedback to Toska
</Typography>
<Box display="flex" justifyContent="space-between">
Expand Down

0 comments on commit 44f4037

Please sign in to comment.