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

View File

@ -186,7 +186,7 @@ climbingRoutesRouter.get('/:id', async (req: Request, res: Response) => {
* type: string * type: string
* example: 'DE: 5, FR: 5c' * example: 'DE: 5, FR: 5c'
* - in: query * - in: query
* name: h-captcha-response * name: hcaptcha_response
* required: true * required: true
* description: The hCaptcha response key * description: The hCaptcha response key
* schema: * schema:
@ -198,7 +198,7 @@ climbingRoutesRouter.post('/', async (req: Request, res: Response) => {
let gym_id = Number(req.query.gym_id); let gym_id = Number(req.query.gym_id);
let name = req.query.name as string; let name = req.query.name as string;
let difficulty = req.query.difficulty 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) { if (isNaN(gym_id) || !name || !difficulty || !captcha_token) {
res.status(400).send({'message': 'Missing parameters'}); 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 * type: string
* example: Nice route! Was a lot of fun! * example: Nice route! Was a lot of fun!
* - in: query * - in: query
* name: h-captcha-response * name: hcaptcha_response
* required: true * required: true
* description: The hCaptcha response key * description: The hCaptcha response key
* schema: * schema:
@ -123,7 +123,7 @@ routeCommentsRouter.post('/', async (req: Request, res: Response) => {
try { try {
let route_id = req.query.route_id as string; let route_id = req.query.route_id as string;
let comment = req.query.comment 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) { if (!route_id || !comment || !captcha_token) {
res.status(400).send({'message': 'Missing parameters'}); 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 * type: integer
* example: 4 * example: 4
* - in: query * - in: query
* name: h-captcha-response * name: hcaptcha_response
* required: true * required: true
* description: The hCaptcha response key * description: The hCaptcha response key
* schema: * schema:
@ -108,7 +108,7 @@ routeRatingsRouter.post('/', async (req: Request, res: Response) => {
try { try {
let route_id = req.query.route_id as string; let route_id = req.query.route_id as string;
let stars = Number(req.query.stars); 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) { if (!route_id || isNaN(stars) || !captcha_token) {
res.status(400).send({'message': 'Missing parameters'}); res.status(400).send({'message': 'Missing parameters'});