Adjusting hcaptcha http parameter name
All checks were successful
Jenkins Production Deployment

This commit is contained in:
Patrick Müller 2022-01-09 21:53:24 +01:00
parent 9aebd12d16
commit ac8de54d95
Signed by: Paddy
GPG Key ID: 37ABC11275CAABCE
4 changed files with 8 additions and 8 deletions

View File

@ -108,7 +108,7 @@ climbingGymRouter.get('/', async (req: Request, res: Response) => {
* type: string
* example: Karlsruhe
* - in: query
* name: h-captcha-response
* name: hcaptcha_response
* required: true
* description: The hCaptcha response key
* schema:
@ -119,7 +119,7 @@ climbingGymRouter.post('/', async (req: Request, res: Response) => {
try {
let name = req.query.name as string;
let city = req.query.city as string;
let captcha_token = req.query['h-captcha-response'] as string;
let captcha_token = req.query['hcaptcha_response'] as string;
if (!name || !city || !captcha_token) {
res.status(400).send({'message': 'Missing parameters'});

View File

@ -186,7 +186,7 @@ climbingRoutesRouter.get('/:id', async (req: Request, res: Response) => {
* type: string
* example: 'DE: 5, FR: 5c'
* - in: query
* name: h-captcha-response
* name: hcaptcha_response
* required: true
* description: The hCaptcha response key
* schema:
@ -198,7 +198,7 @@ climbingRoutesRouter.post('/', async (req: Request, res: Response) => {
let gym_id = Number(req.query.gym_id);
let name = req.query.name as string;
let difficulty = req.query.difficulty as string;
let captcha_token = req.query['h-captcha-response'] as string;
let captcha_token = req.query['hcaptcha_response'] as string;
if (isNaN(gym_id) || !name || !difficulty || !captcha_token) {
res.status(400).send({'message': 'Missing parameters'});

View File

@ -112,7 +112,7 @@ routeCommentsRouter.get('/by/route/:id', async (req: Request, res: Response) =>
* type: string
* example: Nice route! Was a lot of fun!
* - in: query
* name: h-captcha-response
* name: hcaptcha_response
* required: true
* description: The hCaptcha response key
* schema:
@ -123,7 +123,7 @@ routeCommentsRouter.post('/', async (req: Request, res: Response) => {
try {
let route_id = req.query.route_id as string;
let comment = req.query.comment as string;
let captcha_token = req.query['h-captcha-response'] as string;
let captcha_token = req.query['hcaptcha_response'] as string;
if (!route_id || !comment || !captcha_token) {
res.status(400).send({'message': 'Missing parameters'});

View File

@ -97,7 +97,7 @@ routeRatingsRouter.get('/by/route/:id', async (req: Request, res: Response) => {
* type: integer
* example: 4
* - in: query
* name: h-captcha-response
* name: hcaptcha_response
* required: true
* description: The hCaptcha response key
* schema:
@ -108,7 +108,7 @@ routeRatingsRouter.post('/', async (req: Request, res: Response) => {
try {
let route_id = req.query.route_id as string;
let stars = Number(req.query.stars);
let captcha_token = req.query['h-captcha-response'] as string;
let captcha_token = req.query['hcaptcha_response'] as string;
if (!route_id || isNaN(stars) || !captcha_token) {
res.status(400).send({'message': 'Missing parameters'});